~grm08/fluidity/hilbert-for-pyop2

« back to all changes in this revision

Viewing changes to schemas/shallow_water_options.rnc

  • Committer: tmb1
  • Date: 2010-10-27 12:18:35 UTC
  • Revision ID: svn-v4:5bf5533e-7014-46e3-b1bb-cce4b9d03719:trunk:2279
Adding a new schemas/ directory following discussion at the dev meeting and
moving all *.rn[c|g] files into it. I'm no schema expert so this may well
require various changes elsewhere to maintain consistency; please could those
who know what they're doing make these changes!

Patrick in particular - please update spud accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include "spud_base.rnc"
 
2
 
 
3
include "adaptivity_options.rnc"
 
4
include "diagnostic_algorithms.rnc"
 
5
include "input_output.rnc"
 
6
include "solvers.rnc"
 
7
include "stabilisation.rnc"
 
8
 
 
9
start =
 
10
   (
 
11
      ## The root node of the options dictionary.
 
12
      element shallow_water_options {
 
13
         comment,
 
14
         ## Model output files are named according to the simulation
 
15
         ## name, e.g. [simulation_name]_0.vtu. Non-standard
 
16
         ## characters in the simulation name should be avoided.
 
17
         element simulation_name {
 
18
            anystring
 
19
         },
 
20
         ## Options dealing with the specification of geometry
 
21
         element geometry {
 
22
            ## Dimension of the problem.
 
23
            ## <b>This can only be set once</b>
 
24
            element dimension {
 
25
               attribute replaces {"NDIM"},
 
26
               element integer_value {
 
27
                  attribute rank {"0"},
 
28
                  ("2"|"1")
 
29
               }
 
30
            },
 
31
            ## The position mesh
 
32
            element mesh {
 
33
               attribute name { "CoordinateMesh" },
 
34
               mesh_info
 
35
            },
 
36
            ## The velocity mesh
 
37
            element mesh {
 
38
               attribute name { "VelocityMesh" },
 
39
               mesh_info
 
40
            },
 
41
            ## The pressure mesh
 
42
            element mesh {
 
43
               attribute name { "PressureMesh" },
 
44
               mesh_info
 
45
            },
 
46
            element mesh {
 
47
               attribute name { xsd:string },
 
48
               mesh_info,
 
49
               element exclude_from_mesh_adaptivity{empty}?
 
50
            }*,
 
51
            ## Quadrature
 
52
            element quadrature {
 
53
               ## Quadrature degree
 
54
               ## 
 
55
               ## note: this specifies the degree of quadrature,
 
56
               ## not the number of gauss points
 
57
               element degree {
 
58
                  attribute replaces {"NGI"},
 
59
                  integer
 
60
               },
 
61
               ## Surface quadrature degree
 
62
               ## 
 
63
               ## note: this specifies the degree of surface
 
64
               ## quadrature not the number of surface gauss points
 
65
               element surface_degree {
 
66
                  attribute replaces {"SNGI"},
 
67
                  integer
 
68
               }?,
 
69
               ## Select which family of quadrature rules to use.
 
70
               ## The default is family_cools.
 
71
               ## family_wandzura allows for degree up to 30
 
72
               ## on triangular meshes.
 
73
               ## family_grundmann_moeller allows for degree up to
 
74
               ## 29 on simplicial meshes in arbitrary dimension.
 
75
               element quadrature_family {
 
76
                 ( "family_cools" | "family_grundmann_moeller" | "family_wandzura" ) 
 
77
               }?
 
78
            }
 
79
         },
 
80
         ## Input/output options
 
81
         element io {
 
82
            ## Format for dump files. Only vtk for now.
 
83
            element dump_format {
 
84
               element string_value{
 
85
                  "vtk"
 
86
               }
 
87
            },
 
88
            (
 
89
               ## Period between dumps in time units.
 
90
               ##
 
91
               ## Specifies the period between each dump of the solution to disk.
 
92
               ## A value of 0.0 indicates that there would be a dump at every timestep.
 
93
               element dump_period {
 
94
                (
 
95
                     element constant {
 
96
                     attribute replaces {"TIMDUM"},
 
97
                     real
 
98
                   }|
 
99
                   ## Python function prescribing real input. Functions should be of the form:
 
100
                   ##
 
101
                   ##  def val(t):
 
102
                   ##     # Function code
 
103
                   ##     return # Return value
 
104
                   ##
 
105
                   ## 
 
106
                   element python {
 
107
                     attribute replaces {"TIMDUM"},
 
108
                     python_code
 
109
                   }
 
110
                )  
 
111
               }|                 
 
112
               ## Dump period, in timesteps.
 
113
               ## 
 
114
               ## Specifies the number of timesteps between each dump of the solution to disk.
 
115
               ## A value of 0 indicates a dump at every timestep.
 
116
               element dump_period_in_timesteps {
 
117
                 (
 
118
                     element constant {
 
119
                     integer
 
120
                   }|
 
121
                   ## Python function prescribing integer input. Functions should be of the form:
 
122
                   ##
 
123
                   ##  def val(t):
 
124
                   ##     # Function code
 
125
                   ##     return # Return value
 
126
                   ##
 
127
                   ## 
 
128
                   element python {
 
129
                     python_code
 
130
                   }
 
131
                )   
 
132
               }
 
133
            ),
 
134
            # every CPUDUM seconds write results to disc.
 
135
            ## This is usually disabled.
 
136
            element cpu_dump_period {
 
137
               attribute replaces {"CPUDUM"},
 
138
               real
 
139
            }?,
 
140
            ## The period between dumps in walltime seconds. This is usually disabled.
 
141
            element wall_time_dump_period {
 
142
               attribute replaces {"WTIDUM"},
 
143
               real
 
144
            }?,
 
145
            (
 
146
               ## The mesh on to which all the fields will be
 
147
               ## interpolated for VTK output.
 
148
               element output_mesh {
 
149
                  attribute name { "VelocityMesh" }
 
150
               }|
 
151
               ## The mesh on to which all the fields will be
 
152
               ## interpolated for VTK output.
 
153
               element output_mesh {
 
154
                  attribute name { "PressureMesh" }
 
155
               }|
 
156
               ## The mesh on to which all the fields will be
 
157
               ## interpolated for VTK output.
 
158
               element output_mesh {
 
159
                  attribute name { "CoordinateMesh" }
 
160
               }|
 
161
               ## The mesh on to which all the fields will be
 
162
               ## interpolated for VTK output.
 
163
               element output_mesh {
 
164
                  attribute name { xsd:string }
 
165
               }
 
166
            )
 
167
         },
 
168
         ## Options dealing with time discretisation
 
169
         element timestepping {
 
170
            ## Current simulation time. At the start of the simulation this
 
171
            ## is the start time.
 
172
            element current_time {
 
173
               attribute replaces {"ACCTIM"},
 
174
               real,
 
175
               ## The following excerpt from the Udunits
 
176
               ## documentation explains the time unit encoding by
 
177
               ## example:
 
178
               ##
 
179
               ## The specification:
 
180
               ##
 
181
               ## seconds since 1992-10-8 15:15:42.5 -6:00
 
182
               ##
 
183
               ## indicates seconds since October 8th, 1992 at 3
 
184
               ## hours, 15 minutes and 42.5 seconds in the afternoon
 
185
               ## in the time zone which is six hours to the west of
 
186
               ## Coordinated Universal Time (i.e.  Mountain Daylight
 
187
               ## Time). The time zone specification can also be
 
188
               ## written without a colon using one or two-digits
 
189
               ## (indicating hours) or three or four digits
 
190
               ## (indicating hours and minutes).
 
191
               ##
 
192
               ## Time units are particularly required in situations
 
193
               ## where the problem (time-varying) boundary conditions
 
194
               ## and/ initial conditions are a function of time as
 
195
               ## defined by a calendar.  Examples include atmospheric
 
196
               ## forcing and climatology. The current time, specified
 
197
               ## above, is zero at the reference data/time.
 
198
               element time_units{attribute date { xsd:string }}?
 
199
            },
 
200
            ## The time step size. If adaptive time stepping is used
 
201
            ## then this is the initial time step size.
 
202
            element timestep {
 
203
               attribute replaces {"DT"},
 
204
               real
 
205
            },
 
206
            ## How many nonlinear iterations in the timestepping loop
 
207
            element nonlinear_iterations {
 
208
               attribute replaces {"ITINOI"},
 
209
               integer
 
210
            },
 
211
            ## Simulation time at which the simulation should end.
 
212
            element finish_time {
 
213
               attribute replaces {"LTIME"},
 
214
               real
 
215
            },
 
216
            ## Timestep after which the simulation should end.
 
217
            element final_timestep {
 
218
               integer
 
219
            }?,
 
220
            ## Maximum CPU time (secs) taken up before
 
221
            ## simulation terminates writing results to disc.
 
222
            ## 
 
223
            ## Manual suggests 1.E+20
 
224
            element cpu_time_limit {
 
225
               attribute replaces {"CPULIM"},
 
226
               real
 
227
            }?,
 
228
            ## Maximum wall time (secs) taken up before
 
229
            ## simulation terminates writing results to disc.
 
230
            ## 
 
231
            ## This is usually disabled.
 
232
            element wall_time_limit {
 
233
               attribute replaces {"WATIME"},
 
234
               real
 
235
            }?
 
236
         },
 
237
         ## The physical parameters
 
238
         element physical_parameters {
 
239
            ## Set a gravity to be included in the buoyancy term.
 
240
            element gravity {
 
241
               ## Acceleration due to gravity. 9.8 m/s^2 on earth.
 
242
               element magnitude {
 
243
                  attribute replaces { "GRAVTY" },
 
244
                  real
 
245
               }
 
246
            }?,
 
247
            element coriolis {
 
248
               attribute replaces { "OPTOME" },
 
249
               (
 
250
                  ## f-plane approximation
 
251
                  ## This means the Coriolis force looks like:
 
252
                  ##   f k x u
 
253
                  ## where k is the z unit vector
 
254
                  ##    and u the velocity vector
 
255
                  ##    and f is constant
 
256
                  element f_plane {
 
257
                     attribute replaces { "OPTOME = 0" },
 
258
                     ## f-plane approximation
 
259
                     ## This means the Coriolis force looks like:
 
260
                     ##   f k x u
 
261
                     ## where k is the z unit vector
 
262
                     ##    and u the velocity vector
 
263
                     ##    and f is constant
 
264
                     element f {
 
265
                        attribute replaces {"OMEGA" },
 
266
                        real
 
267
                     }
 
268
                  }|
 
269
                  ## Beta-plane approximation
 
270
                  ## This means the Coriolis force looks like:
 
271
                  ##   f k x u
 
272
                  ## where k is the z unit vector
 
273
                  ##    and u the velocity vector
 
274
                  ##    and f=f_0+beta . (x,y,z)
 
275
                  element beta_plane {
 
276
                     attribute replaces { "OPTOME = 1" },
 
277
                     ## Beta-plane approximation
 
278
                     ## This means the Coriolis force looks like:
 
279
                     ##   f k x u
 
280
                     ## where k is the z unit vector
 
281
                     ##    and u the velocity vector
 
282
                     ##    and f=f_0+beta . (x,y,z)
 
283
                     element f_0 {
 
284
                        attribute replaces {"OMEGA" },
 
285
                        real
 
286
                     },
 
287
                     ## Beta-plane approximation
 
288
                     ## This means the Coriolis force looks like:
 
289
                     ##   f k x u
 
290
                     ## where k is the z unit vector
 
291
                     ##    and u the velocity vector
 
292
                     ##    and f=f_0+beta . (x,y,z)
 
293
                     ## usually only the y-component of beta is non-zero
 
294
                     element beta {
 
295
                        attribute replaces {"OMEGA1 OMEGA2 OMEGA3" },
 
296
                        real_dim_vector
 
297
                     }
 
298
                  }
 
299
               )
 
300
            }?
 
301
         },
 
302
         ## The material or phase options
 
303
         element material_phase {
 
304
            attribute name { "Fluid" },
 
305
            (
 
306
               ## Velocity vector and momentum options
 
307
               element vector_field {
 
308
                  attribute rank { "1" },
 
309
                  attribute name { "Velocity" },
 
310
                  ## Field type
 
311
                  (
 
312
                     element prognostic {
 
313
                        element mesh {
 
314
                           attribute name { "VelocityMesh" }
 
315
                        },
 
316
                        prognostic_velocity_field
 
317
                     }|
 
318
                     element prescribed {
 
319
                        element mesh {
 
320
                           attribute name { "VelocityMesh" }
 
321
                        },
 
322
                        prescribed_vector_field
 
323
                     }|
 
324
                     element aliased {
 
325
                        attribute material_phase_name { xsd:string },
 
326
                        attribute field_name {"Velocity" }
 
327
                     }
 
328
                  )
 
329
               },
 
330
               ## Free surface elevation
 
331
               element scalar_field {
 
332
                  attribute rank { "0" },
 
333
                  attribute name { "LayerThickness" },
 
334
                  element prognostic {
 
335
                     pressure_mesh_choice,
 
336
                     prognostic_layerthickness_field
 
337
                  }
 
338
               },                  
 
339
               scalar_field_choice*,
 
340
               vector_field_choice*
 
341
               #tensor_field_choice*
 
342
            )
 
343
         },
 
344
        element mesh_adaptivity {
 
345
          (
 
346
             hr_adaptivity|
 
347
             prescribed_adaptivity
 
348
          )
 
349
        }?,
 
350
         ## Debugging options
 
351
         element debug {
 
352
            element check_inverse_coriolis_matrix {
 
353
               empty
 
354
            }?,
 
355
            element check_wave_matrix {
 
356
               empty
 
357
            }?,
 
358
            element check_solution {
 
359
               empty
 
360
            }?
 
361
         }?
 
362
      }
 
363
   )      
 
364
 
 
365
scalar_field_choice = 
 
366
   (
 
367
      # The first is a generic field, which may be used for any user-defined field
 
368
      # that FLUIDITY knows nothing about, or a generic diagnostic
 
369
      (
 
370
         element scalar_field {
 
371
            attribute rank { "0" },
 
372
            attribute name { xsd:string },
 
373
            ## Field type
 
374
            (
 
375
               element prognostic {
 
376
                  velocity_mesh_choice,
 
377
                  prognostic_scalar_field
 
378
               }|
 
379
               element prescribed {
 
380
                  velocity_mesh_choice,
 
381
                  prescribed_scalar_field
 
382
               }|
 
383
               element diagnostic {
 
384
                  scalar_diagnostic_algorithms,
 
385
                  velocity_mesh_choice,
 
386
                  diagnostic_scalar_field
 
387
               }
 
388
            )
 
389
         }|
 
390
         ## Passive Tracer
 
391
         element scalar_field {
 
392
            attribute rank { "0" },
 
393
            attribute name { "Tracer" },
 
394
            attribute replaces { "IDENT = 666" },
 
395
            element prognostic {
 
396
               velocity_mesh_choice,
 
397
               prognostic_scalar_field
 
398
            }
 
399
         }|
 
400
         ## CFLNumber
 
401
         ##
 
402
         ## See http://amcg.ese.ic.ac.uk/index.php?title=Local:Diagnostics#CFL_Number
 
403
         ##
 
404
         ## Adapting to this field is not recommended
 
405
         element scalar_field {
 
406
            attribute rank { "0" },
 
407
            attribute name { "CFLNumber" },
 
408
            attribute replaces { "IDENT = -601" },
 
409
            (
 
410
               element diagnostic {
 
411
                  internal_algorithm,
 
412
                  velocity_mesh_choice,
 
413
                  diagnostic_scalar_field
 
414
               }
 
415
            )
 
416
         }
 
417
      )
 
418
   )
 
419
 
 
420
# Choice of input method, e.g. for boundary conditions
 
421
input_choice_real =
 
422
   (
 
423
      input_choice_real_contents
 
424
   )
 
425
 
 
426
input_choice_real_plus_boundary_forcing =
 
427
   (
 
428
      input_choice_real_contents|
 
429
        element from_file {
 
430
           element tidal {
 
431
                attribute file_name { string },
 
432
                attribute variable_name_amplitude { string },
 
433
                attribute variable_name_phase { string },
 
434
                ## See E.W. Schwiderski - Rev. Geophys. Space
 
435
                ## Phys. Vol. 18 No. 1 pp. 243--268, 1980
 
436
                ## for details of these constituent.
 
437
                attribute name {"M2"|"S2"|"N2"|"K2"|"K1"|"O1"|"P1"|"Q1"|"Mf"|"Mm"|"Ssa"}
 
438
           }+
 
439
         }
 
440
   )
 
441
 
 
442
input_choice_real_plus_file =
 
443
   (
 
444
      input_choice_real_contents|
 
445
      ## Initialise the field from an existing file (indended primarily for picking up prescribed fields from previously run prognostic simulations). The file mesh must match the mesh of this field (except for piecewise constant fields which will be remapped back from the discontinuous nodal values).
 
446
      ##
 
447
      ## THIS WILL NOT WORK FOR PRESCRIBED FIELDS NOT DIRECTLY UNDERNEATH /material_phase
 
448
      element from_file {
 
449
         attribute file_name { xsd:string },
 
450
         vtu_input_format,
 
451
         comment
 
452
      }
 
453
   )
 
454
 
 
455
input_choice_real_contents =
 
456
   ## Constant value
 
457
   element constant {
 
458
      real
 
459
   }|
 
460
   ## Python function prescribing real input. Functions should be of the form:
 
461
   ##
 
462
   ##  def val(X, t):
 
463
   ##     # Function code
 
464
   ##     return # Return value
 
465
   ##
 
466
   ## where X is a tuple of length geometry dimension.
 
467
   element python {
 
468
      python_code
 
469
   }
 
470
   
 
471
# Choice of input method for initial conditions
 
472
# Note: combine = "choice" should be used here to combine with input_choice_real, but Diamond doesn't support it
 
473
input_choice_initial_condition_real =
 
474
   (
 
475
      ## Constant value
 
476
      element constant {
 
477
         real
 
478
      }|
 
479
      ## Python function prescribing real input. Functions should be of the form:
 
480
      ##
 
481
      ##  def val(X, t):
 
482
      ##     # Function code
 
483
      ##     return # Return value
 
484
      ##
 
485
      ## where X is a tuple of length geometry dimension.
 
486
      element python {
 
487
         python_code
 
488
      }|
 
489
      ## Initialise the field from an existing file (indended
 
490
      ## primarily for use in checkpointing). The file mesh must match
 
491
      ## the mesh of this field  (except for piecewise constant fields 
 
492
      ## which will be remapped back from the discontinuous nodal values). 
 
493
      ## In parallel the process number is
 
494
      ## appended to the filename, e.g. if the file_name attribute is
 
495
      ## set to "input.vtu", process 0 reads from "input-0.vtu".
 
496
      element from_file {
 
497
         attribute file_name { xsd:string },
 
498
         (
 
499
            vtu_input_format|
 
500
            netcdf_input_format
 
501
         ),
 
502
         comment
 
503
      }
 
504
   )
 
505
 
 
506
# Choice of input method, e.g. for boundary conditions
 
507
input_choice_real_dim_vector =
 
508
   (
 
509
      input_choice_real_dim_vector_contents
 
510
   )
 
511
 
 
512
# Choice of input method, e.g. for prescribed fields
 
513
input_choice_real_dim_vector_plus_file =
 
514
   (
 
515
      input_choice_real_dim_vector_contents|
 
516
      ## Initialise the field from an existing file (indended primarily for picking up prescribed fields from previously run prognostic simulations). The file mesh must match the mesh of this field (except for piecewise constant fields which will be remapped back from the discontinuous nodal values).
 
517
      ##
 
518
      ## THIS WILL NOT WORK FOR PRESCRIBED FIELDS NOT DIRECTLY UNDERNEATH /material_phase
 
519
      element from_file {
 
520
         attribute file_name { xsd:string },
 
521
         vtu_input_format,
 
522
         comment
 
523
      }
 
524
   )
 
525
 
 
526
input_choice_real_dim_vector_contents =
 
527
   ## Constant value
 
528
   element constant {
 
529
      real_dim_vector
 
530
   }|
 
531
   ## Python function prescribing dimensional vector input. Functions should be of the form:
 
532
   ##
 
533
   ##  def val(X, t):
 
534
   ##     # Function code
 
535
   ##     return # Return value
 
536
   ##
 
537
   ## where X and the return value are tuples of length geometry dimension.
 
538
   element python {
 
539
      python_code
 
540
   }
 
541
 
 
542
# Choice of input method, e.g. for boundary conditions
 
543
# this one specifies a vector field of dim minus one
 
544
input_choice_real_dim_minus_one_vector =
 
545
   (
 
546
      ## Constant value
 
547
      element constant {
 
548
         real_dim_minus_one_vector
 
549
      }|
 
550
      ## Python function prescribing dimensional vector input. Functions should be of the form:
 
551
      ##
 
552
      ##  def val(X, t):
 
553
      ##     # Function code
 
554
      ##     return # Return value
 
555
      ##
 
556
      ## where X and the return value are tuples of length geometry dimension.
 
557
      element python {
 
558
         python_code
 
559
      }
 
560
   )
 
561
 
 
562
## Import data from NetCDF CF-1.x file.
 
563
input_choice_netcdf =
 
564
   (
 
565
      element from_file {
 
566
         ## The format of this file should conform to NetCDF CF 1.x
 
567
         ## (http://cf-pcmdi.llnl.gov/)
 
568
         attribute file_name { xsd:string },
 
569
         comment
 
570
      }
 
571
   )
 
572
 
 
573
# Choice of input method for initial conditions
 
574
# Note: combine = "choice" should be used here to combine with input_choice_real, but Diamond doesn't support it
 
575
input_choice_initial_condition_vector =
 
576
   (
 
577
      ## Constant value
 
578
      element constant {
 
579
         real_dim_vector
 
580
      }|
 
581
      ## Python function prescribing dimensional vector input. Functions should be of the form:
 
582
      ##
 
583
      ##  def val(X, t):
 
584
      ##     # Function code
 
585
      ##     return # Return value
 
586
      ##
 
587
      ## where X and the return value are tuples of length geometry dimension.
 
588
      element python {
 
589
         python_code
 
590
      }|
 
591
      ## Initialise the field from an existing file (indended primarily for use in checkpointing). The file mesh must match the mesh of this field (except for piecewise constant fields which will be remapped back from the discontinuous nodal values).
 
592
      element from_file {
 
593
         attribute file_name { xsd:string },
 
594
         vtu_input_format,
 
595
         comment
 
596
      }|
 
597
      ## Set balanced velocity from height field
 
598
      element balanced {
 
599
         empty
 
600
      }
 
601
   )  
 
602
 
 
603
# Choice of input method for initial/boundary conditions
 
604
# version for real symmetric tensor
 
605
input_choice_real_dim_symmetric_tensor =
 
606
   (
 
607
      ## Constant symmetric tensor
 
608
      element constant {
 
609
         real_dim_symmetric_tensor
 
610
      }|
 
611
      ## Python command prescribing symmetric tensor input.
 
612
      ##
 
613
      ## Note that it is for the python function to determine 
 
614
      ## that the results it produces are, in fact, symmetric.
 
615
      ##
 
616
      ## An example that returns the three-dimensional identity:
 
617
      ##
 
618
      ##  def val(X, t):
 
619
      ##    return [[1, 0, 0],
 
620
      ##                [0, 1, 0],
 
621
      ##                [0, 0, 1]]
 
622
      element python {
 
623
         python_code
 
624
      }
 
625
   )
 
626
 
 
627
# Choice of input method for initial/boundary conditions
 
628
# version for real tensor
 
629
input_choice_real_dim_tensor =
 
630
   (
 
631
      ## Constant tensor
 
632
      element constant {
 
633
         real_dim_tensor
 
634
      }|
 
635
      ## Python command prescribing tensor input.
 
636
      ##
 
637
      ## An example that returns the three-dimensional identity:
 
638
      ##
 
639
      ##  def val(X, t):
 
640
      ##    return [[1, 0, 0],
 
641
      ##                [0, 1, 0],
 
642
      ##                [0, 0, 1]]
 
643
      element python {
 
644
         python_code
 
645
      }
 
646
   )
 
647
 
 
648
prognostic_velocity_field =
 
649
   (
 
650
      velocity_equation_choice,
 
651
      ## Spatial discretisation options
 
652
      element spatial_discretisation {
 
653
         (
 
654
            ## A new version of continuous galerkin assembly.
 
655
            element continuous_galerkin {
 
656
               ## Stabilisation options for the galerkin discretisation
 
657
               element stabilisation{
 
658
                  (
 
659
                     no_stabilisation|
 
660
                     su_stabilisation|
 
661
                     supg_stabilisation
 
662
                  )
 
663
               },
 
664
               ## Discretisation options for the mass terms in the velocity equation.
 
665
               element mass_terms{
 
666
                  ## Lump the mass matrix - currently required if solving for pressure
 
667
                  element lump_mass_matrix {
 
668
                     ## Lump on the submesh.
 
669
                     ## This only works for simplex meshes and is only
 
670
                     ## strictly valid on 2d meshes.
 
671
                     element use_submesh {
 
672
                       empty
 
673
                     }?
 
674
                  }?,
 
675
                  ## Remove the mass terms from the equation.
 
676
                  element exclude_mass_terms {
 
677
                     empty
 
678
                  }?
 
679
               },
 
680
               ## Discretisation options for the advection terms in the velocity equation.
 
681
               element advection_terms {
 
682
                  ## Integrate the advection terms of the momentum equation by parts.
 
683
                  ## This allows for the imposition of weak boundary conditions.
 
684
                  ## If activated the element advection matrix takes the form:
 
685
                  ##    /                                            /
 
686
                  ##  - | (grad N_A dot nu) N_B rho dV - (1. - beta) | N_A ( div nu ) N_B rho dV
 
687
                  ##    /                                            /
 
688
                  ## otherwise it takes the standard form:
 
689
                  ##    /                                     /
 
690
                  ##    | N_A (nu dot grad N_B) rho dV + beta | N_A ( div nu ) N_B rho dV
 
691
                  ##    /                                     /
 
692
                  ## where beta is set in conservative_advection, N is
 
693
                  ## a shape function and nu is the relative nonlinear
 
694
                  ## velocity.
 
695
                  element integrate_advection_by_parts {
 
696
                     empty
 
697
                  }?,
 
698
                  ## Remove the advection terms (u.grad u rho + beta
 
699
                  ## div u rho u) from the equation.
 
700
                  ## This overrides any other advection term options
 
701
                  ## (including conservative_advection below).
 
702
                  element exclude_advection_terms {
 
703
                     empty
 
704
                  }?
 
705
               }
 
706
            }|
 
707
            ## Discontinuous galerkin formulation. This causes Momentum_DG to be
 
708
            ## called instead of diff3d. Confusingly it is not necessary to provide
 
709
            ## a discontinuous velocity field for this to work!
 
710
            element discontinuous_galerkin {
 
711
               attribute replaces { "DISOPT" },
 
712
               element advection_scheme {
 
713
                  (
 
714
                     ## Disable advection
 
715
                     element none {
 
716
                        empty
 
717
                     }| 
 
718
                     ## Straightforward upwinding of the nonlinear velocity
 
719
                     element upwind {
 
720
                        empty
 
721
                     }
 
722
                  )
 
723
               }
 
724
            }
 
725
         )
 
726
      },
 
727
      ## Solver
 
728
      element solver {
 
729
         linear_solver_options_asym
 
730
      },
 
731
      (
 
732
         ## Initial condition for WholeMesh
 
733
         ##
 
734
         ## Only specify one condition if not using mesh regions.
 
735
         ## Otherwise select other initial_condition option, specify region_ids
 
736
         ## and distinct names.  Then add extra intial conditions for other regions.
 
737
         element initial_condition {
 
738
            attribute name { "WholeMesh" },
 
739
            input_choice_initial_condition_vector
 
740
         }|
 
741
         ## Multiple initial_conditions are allowed if specifying
 
742
         ## different values in different
 
743
         ## regions of the mesh (defined by region_ids).  In this case
 
744
         ## each initial_condition
 
745
         ## requires a distinct name for the options dictionary.
 
746
         element initial_condition {
 
747
            attribute name { string },
 
748
            region_ids,
 
749
            input_choice_initial_condition_vector
 
750
         }
 
751
      )+,
 
752
      ## Boundary conditions
 
753
      element boundary_conditions {
 
754
         attribute replaces { "boundary, TMPER1 TMPER2 TMPERI" },
 
755
         attribute name { string },
 
756
         ## Surface id:
 
757
         element surface_ids {
 
758
            integer_vector
 
759
         },
 
760
         velocity_boundary_conditions
 
761
      }*,
 
762
      prognostic_vector_output_options,
 
763
      prognostic_vector_stat_options,
 
764
      vector_convergence_options,
 
765
      prognostic_detector_options,
 
766
      vector_steady_state_options,
 
767
      adaptivity_options_prognostic_vector_field,
 
768
      interpolation_algorithm_vector,
 
769
      discrete_properties_algorithm_vector?
 
770
   )
 
771
 
 
772
prognostic_layerthickness_field =
 
773
   (
 
774
      ## Spatial discretisation options
 
775
      element spatial_discretisation {
 
776
         (
 
777
            ## Development continuous Galerkin formulation. This causes
 
778
            ## Advection_Diffusion_CG to be used instead of hart3d.
 
779
            element continuous_galerkin {
 
780
               ## Discretisation options for the advection terms.
 
781
               element advection_terms {
 
782
                  ## Remove the advection terms from the equation.
 
783
                  ## This overrides any other advection term options (including
 
784
                  ## conservative_advection below).
 
785
                  element exclude_advection_terms {
 
786
                     comment
 
787
                  }?
 
788
               },
 
789
               comment
 
790
            }
 
791
         )
 
792
      },
 
793
      ## Temporal discretisation options
 
794
      element temporal_discretisation {
 
795
         ## Implicit/explicit control (THETA)
 
796
         ##  =0.  -- explicit
 
797
         ##  =0.5 -- Crank-Nicolson
 
798
         ##  =1.  -- implicit
 
799
         element theta {
 
800
            attribute replaces {"THETA"},
 
801
            real
 
802
         },
 
803
         ## Non-linear relaxation term
 
804
         ##  =0.  -- previous timestep velocity solution used in non-linear terms of momentum equations
 
805
         ##  =1.  -- previous iteration velocity solution used in non-linear terms of momentum equations
 
806
         ##  0. < ITHETA < 1.
 
807
         element relaxation {
 
808
            attribute replaces {"ITHETA"},
 
809
            real
 
810
         }
 
811
      },
 
812
      ## Solver
 
813
      element solver {
 
814
         linear_solver_options_asym
 
815
      },
 
816
      (
 
817
         ## Initial condition for WholeMesh
 
818
         ##
 
819
         ## Only specify one condition if not using mesh regions.
 
820
         ## Otherwise select other initial_condition option, specify region_ids
 
821
         ## and distinct names.  Then add extra intial conditions for other regions.
 
822
         element initial_condition {
 
823
            attribute name { "WholeMesh" },
 
824
            input_choice_initial_condition_real
 
825
         }|
 
826
         ## Multiple initial_conditions are allowed if specifying
 
827
         ## different values in different
 
828
         ## regions of the mesh (defined by region_ids).  In this case
 
829
         ## each initial_condition
 
830
         ## requires a distinct name for the options dictionary.
 
831
         element initial_condition {
 
832
            attribute name { string },
 
833
            region_ids,
 
834
            input_choice_initial_condition_real
 
835
         }
 
836
      ),      
 
837
      ## Mean value of thickness to use in wave equation solver
 
838
      ## Will be replaced by a field in due course
 
839
      element mean_layer_thickness {
 
840
         real
 
841
      },
 
842
      prognostic_scalar_output_options,
 
843
      prognostic_scalar_stat_options,
 
844
      adaptivity_options_prognostic_scalar_field,
 
845
      interpolation_algorithm_scalar
 
846
   )
 
847
 
 
848
 
 
849
prognostic_scalar_field =
 
850
   (
 
851
      ## Solver
 
852
      element solver {
 
853
         linear_solver_options_sym
 
854
      },
 
855
      (
 
856
         ## Initial condition for WholeMesh
 
857
         ##
 
858
         ## Only specify one condition if not using mesh regions.
 
859
         ## Otherwise select other initial_condition option, specify region_ids
 
860
         ## and distinct names.  Then add extra intial conditions for other regions.
 
861
         element initial_condition {
 
862
            attribute name { "WholeMesh" },
 
863
            input_choice_initial_condition_real
 
864
         }|
 
865
         ## Multiple initial_conditions are allowed if specifying
 
866
         ## different values in different
 
867
         ## regions of the mesh (defined by region_ids).  In this case
 
868
         ## each initial_condition
 
869
         ## requires a distinct name for the options dictionary.
 
870
         element initial_condition {
 
871
            attribute name { string },
 
872
            region_ids,
 
873
            input_choice_initial_condition_real
 
874
         }
 
875
      ),
 
876
      ## Diffusivity for field
 
877
      element tensor_field {
 
878
         attribute name { "Diffusivity" },
 
879
         attribute rank { "2" },
 
880
         attribute replaces { "TMUXX TMUYY TMUZZ TMUYZ TMUXZ TMUXY TALLMU TCONMU" },
 
881
         element prescribed {
 
882
            mesh_choice?,
 
883
            prescribed_values_tensor_field
 
884
         }
 
885
      }?,
 
886
      prognostic_scalar_output_options,
 
887
      prognostic_scalar_stat_options
 
888
   )
 
889
 
 
890
# Default child of diagnostic scalar field
 
891
diagnostic_scalar_field =
 
892
   (
 
893
      diagnostic_output_options,
 
894
      diagnostic_scalar_stat_options,
 
895
      scalar_convergence_options,
 
896
      diagnostic_detector_options,
 
897
      scalar_steady_state_options,
 
898
      adaptivity_options_scalar_field,
 
899
      recalculation_options?
 
900
   )
 
901
   
 
902
# Default child of diagnostic scalar field without adaptivity options
 
903
diagnostic_scalar_field_no_adapt =
 
904
   (
 
905
      diagnostic_output_options,
 
906
      diagnostic_scalar_stat_options,
 
907
      diagnostic_detector_options
 
908
   )
 
909
 
 
910
# Default child of diagnostic scalar field
 
911
diagnostic_scalar_field_tidal_range =
 
912
   (
 
913
      diagnostic_output_options,
 
914
      diagnostic_scalar_stat_options,
 
915
      diagnostic_detector_options,
 
916
      adaptivity_options_scalar_field,
 
917
      (
 
918
          element spin_up_time {
 
919
             real
 
920
          }
 
921
      )       
 
922
   )
 
923
 
 
924
# Default child of prescribed scalar field
 
925
# This is a choice of ways of inputing the prescribed field
 
926
prescribed_scalar_field =
 
927
   (
 
928
      prescribed_scalar_field_no_adapt,
 
929
      adaptivity_options_scalar_field,
 
930
      interpolation_algorithm_scalar?,
 
931
      discrete_properties_algorithm_scalar?,
 
932
      recalculation_options?
 
933
   )
 
934
 
 
935
# Default child of prescribed scalar field without adaptivity options
 
936
# This is a choice of ways of inputing the prescribed field
 
937
prescribed_scalar_field_no_adapt =
 
938
   (
 
939
      prescribed_values_scalar_field,
 
940
      prescribed_output_options,
 
941
      prescribed_scalar_stat_options,
 
942
      prescribed_detector_options
 
943
   )
 
944
   
 
945
prescribed_values_scalar_field =
 
946
   (
 
947
      (
 
948
         ## Value for WholeMesh
 
949
         ## Only specify one value if not using mesh regions.
 
950
         ## Otherwise select other value option, specify region_ids
 
951
         ## and distinct names.  Then add extra values for other regions.
 
952
         element value {
 
953
            attribute name { "WholeMesh" },
 
954
            input_choice_real_plus_file
 
955
         }|
 
956
         ## Multiple values are now allowed if using different value assignments
 
957
         ## in different regions of the mesh (specified by region_ids).
 
958
         ## In this case each value requires a distinct name for the options dictionary.
 
959
         element value {
 
960
            attribute name { string },
 
961
            region_ids,
 
962
            input_choice_real_plus_file
 
963
         }
 
964
      )+
 
965
   )
 
966
 
 
967
# Default child of diagnostic vector field
 
968
# Currently, this is empty, but in future this might include
 
969
# options that are general to all diagnostic vector fields
 
970
diagnostic_vector_field =
 
971
   (
 
972
      diagnostic_output_options,
 
973
      diagnostic_vector_stat_options,
 
974
      vector_convergence_options,      
 
975
      diagnostic_detector_options,
 
976
      vector_steady_state_options,      
 
977
      adaptivity_options_vector_field,
 
978
      recalculation_options?
 
979
   )
 
980
 
 
981
 
 
982
diagnostic_vector_field_bed_shear_stress =
 
983
   (
 
984
      (
 
985
          element density {
 
986
             real
 
987
          }
 
988
      ),       
 
989
      (
 
990
          element drag_coefficient {
 
991
             real
 
992
          }
 
993
      ),   
 
994
      diagnostic_output_options,
 
995
      diagnostic_vector_stat_options,
 
996
      diagnostic_detector_options,
 
997
      adaptivity_options_vector_field
 
998
   )
 
999
 
 
1000
 
 
1001
 
 
1002
# Default child of prescribed vector field
 
1003
# This is a choice of ways of inputing the prescribed field
 
1004
prescribed_vector_field =
 
1005
   (
 
1006
      prescribed_vector_field_no_adapt,
 
1007
      adaptivity_options_vector_field,
 
1008
      interpolation_algorithm_vector?,
 
1009
      discrete_properties_algorithm_vector?,
 
1010
      recalculation_options?
 
1011
   )
 
1012
   
 
1013
# Default child of prescribed vector field without adaptivity options
 
1014
# This is a choice of ways of inputing the prescribed field
 
1015
prescribed_vector_field_no_adapt =
 
1016
   (
 
1017
      prescribed_values_vector_field,
 
1018
      prescribed_output_options,
 
1019
      prescribed_vector_stat_options,
 
1020
      prescribed_detector_options
 
1021
   )
 
1022
 
 
1023
prescribed_values_vector_field =
 
1024
   (
 
1025
      (
 
1026
         ## Value for WholeMesh
 
1027
         ##
 
1028
         ## Only specify one value if not using mesh regions.
 
1029
         ## Otherwise select other value option, specify region_ids
 
1030
         ## and distinct names.  Then add extra values for other regions.
 
1031
         element value {
 
1032
            attribute name { "WholeMesh" },
 
1033
            input_choice_real_dim_vector_plus_file
 
1034
         }|
 
1035
         ## Multiple values are now allowed if using different value assignments
 
1036
         ## in different regions of the mesh (specified by region_ids).
 
1037
         ## In this case each value requires a distinct name for the options dictionary.
 
1038
         element value {
 
1039
            attribute name { string },
 
1040
            region_ids,
 
1041
            input_choice_real_dim_vector_plus_file
 
1042
         }
 
1043
      )+
 
1044
   )
 
1045
 
 
1046
# Default child of diagnostic tensor field
 
1047
# Currently, this is empty, but in future this might include
 
1048
# options that are general to all diagnostic tensor fields
 
1049
diagnostic_tensor_field =
 
1050
   (
 
1051
      diagnostic_output_options,
 
1052
      adaptivity_options_tensor_field
 
1053
   )
 
1054
 
 
1055
# Default child of prescribed vector field
 
1056
# This is a choice of ways of inputing the prescribed tensor field
 
1057
# If the field is constant then a symmetric, or asymmetric tensor may be entered
 
1058
prescribed_tensor_field =
 
1059
   (
 
1060
      prescribed_values_tensor_field,
 
1061
      adaptivity_options_tensor_field
 
1062
   )
 
1063
 
 
1064
prescribed_values_tensor_field =
 
1065
   (
 
1066
      (
 
1067
         ## Value for WholeMesh
 
1068
         ##
 
1069
         ## Only specify one value if not using mesh regions.
 
1070
         ## Otherwise select other value option, specify region_ids
 
1071
         ## and distinct names.  Then add extra values for other regions.
 
1072
         element value {
 
1073
            attribute name { "WholeMesh" },
 
1074
            input_choice_tensor_field
 
1075
         }|
 
1076
         ## Multiple values are now allowed if using different value assignments
 
1077
         ## in different regions of the mesh (specified by region_ids).
 
1078
         ## In this case each value requires a distinct name for the options dictionary.
 
1079
         element value {
 
1080
            attribute name { string },
 
1081
            region_ids,
 
1082
            input_choice_tensor_field
 
1083
         }
 
1084
      )+
 
1085
   )
 
1086
 
 
1087
 
 
1088
velocity_components_choice =
 
1089
   (
 
1090
      (
 
1091
# rotated bcs are not implemented... this is where they should go when they are
 
1092
#         element align_bc_with_surface {
 
1093
#            element normal_component {
 
1094
#               input_choice_real
 
1095
#            }?,
 
1096
#            element tangent_component_1 {
 
1097
#               input_choice_real
 
1098
#            }?,
 
1099
#            element tangent_component_2 {
 
1100
#               input_choice_real
 
1101
#            }?,
 
1102
#            rotation_matrix_components
 
1103
#         }|
 
1104
         element align_bc_with_cartesian {
 
1105
            element x_component {
 
1106
               input_choice_real_bc_component
 
1107
            }?,
 
1108
            element y_component {
 
1109
               input_choice_real_bc_component
 
1110
            }?,
 
1111
            element z_component {
 
1112
               input_choice_real_bc_component
 
1113
            }?
 
1114
         }
 
1115
      )
 
1116
   )
 
1117
   
 
1118
input_choice_real_bc_component = 
 
1119
   (
 
1120
      input_choice_real|
 
1121
      element synthetic_eddy_method {
 
1122
         ## use a large number to ensure Gaussian 
 
1123
         ## behaviour of the fluctuating component
 
1124
         element number_of_eddies {
 
1125
           integer
 
1126
         },
 
1127
         element turbulence_lengthscale {
 
1128
            input_choice_real
 
1129
         },
 
1130
         ## mean profile
 
1131
         ##
 
1132
         ## usually a function of height,
 
1133
         ## for ABL simulations use a log profile
 
1134
         element mean_profile {
 
1135
            input_choice_real
 
1136
         },
 
1137
         ## Reynolds stresses profile
 
1138
         ##
 
1139
         ## usually a function of height,
 
1140
         ## assumes that the remaining stresses are negligible 
 
1141
         element Re_stresses_profile {
 
1142
           input_choice_real
 
1143
         }
 
1144
      }
 
1145
   )
 
1146
 
 
1147
# and again for robin b.c.s
 
1148
robin_velocity_components_choice =
 
1149
   (
 
1150
      (
 
1151
#         element align_bc_with_surface {
 
1152
#            element normal_component {
 
1153
#               element order_zero_coefficient {
 
1154
#                  input_choice_real
 
1155
#               },
 
1156
#               element order_one_coefficient {
 
1157
#                  input_choice_real
 
1158
#               }
 
1159
#            }?,
 
1160
#            element tangent_component_1 {
 
1161
#               element order_zero_coefficient {
 
1162
#                  input_choice_real
 
1163
#               },
 
1164
#               element order_one_coefficient {
 
1165
#                  input_choice_real
 
1166
#               }
 
1167
#            }?,
 
1168
#            element tangent_component_2 {
 
1169
#               element order_zero_coefficient {
 
1170
#                  input_choice_real
 
1171
#               },
 
1172
#               element order_one_coefficient {
 
1173
#                  input_choice_real
 
1174
#               }
 
1175
#            }?,
 
1176
#            rotation_matrix_components
 
1177
#         }|
 
1178
         element align_bc_with_cartesian {
 
1179
            element x_component {
 
1180
               element order_zero_coefficient {
 
1181
                  input_choice_real
 
1182
               },
 
1183
               element order_one_coefficient {
 
1184
                  input_choice_real
 
1185
               }
 
1186
            }?,
 
1187
            element y_component {
 
1188
               element order_zero_coefficient {
 
1189
                  input_choice_real
 
1190
               },
 
1191
               element order_one_coefficient {
 
1192
                  input_choice_real
 
1193
               }
 
1194
            }?,
 
1195
            element z_component {
 
1196
               element order_zero_coefficient {
 
1197
                  input_choice_real
 
1198
               },
 
1199
               element order_one_coefficient {
 
1200
                  input_choice_real
 
1201
               }
 
1202
            }?
 
1203
         }
 
1204
      )
 
1205
   )
 
1206
 
 
1207
velocity_boundary_conditions =
 
1208
   (
 
1209
      (
 
1210
         element type {
 
1211
            attribute name { "dirichlet" },
 
1212
            ## Apply the dirichlet bc weakly.  Available automatically
 
1213
            ## with a discontinuous_galerkin Velocity
 
1214
            ## spatial_discretisation.  Available if you
 
1215
            ## integrate_continuity_by_parts with a
 
1216
            ## continuous_galerkin Pressure or use a control_volume
 
1217
            ## Pressure spatial_discretisation and/or
 
1218
            ## integrate_advection_by_parts under Velocity
 
1219
            ## spatial_discretisation with continuous_galerkin.
 
1220
            ##
 
1221
            ## If not selected boundary conditions are applied strongly.
 
1222
            element apply_weakly {
 
1223
               ## If the initial condition and boundary conditions
 
1224
               ## differ, setting this option will cause the initial
 
1225
               ## condition on the boundary to be overwritten with
 
1226
               ## the boundary condition. Since you are applying the
 
1227
               ## boundary condition weakly, you probably do *not*
 
1228
               ## want this.
 
1229
               element boundary_overwrites_initial_condition {
 
1230
                  empty
 
1231
               }?
 
1232
            }?,
 
1233
            velocity_components_choice
 
1234
         }|
 
1235
         element type {
 
1236
            attribute name { "neumann" },
 
1237
            velocity_components_choice
 
1238
         }|
 
1239
         element type {
 
1240
            attribute name { "robin" },
 
1241
            robin_velocity_components_choice
 
1242
         }|
 
1243
         element type {
 
1244
            attribute name { "free_surface" }
 
1245
         }|
 
1246
         ## Apply quadratic drag. Specify drag coefficient. If you
 
1247
         ## want to exactly replicate results from using the OCEDRA
 
1248
         ## option, set this to 0.003 and remember to apply to both
 
1249
         ## bottom and sides.
 
1250
         element type {
 
1251
            attribute name { "drag" },
 
1252
            input_choice_real,
 
1253
            (
 
1254
              ## Use a quadratic drag.
 
1255
              ##
 
1256
              ## This means that the drag coefficient is nondimensional.
 
1257
              element quadratic_drag {
 
1258
                empty
 
1259
              }|
 
1260
              ## Use a linear drag (basically just a surface absorption term).
 
1261
              ##
 
1262
              ## This means that the drag coefficient has units of momentum.
 
1263
              element linear_drag {
 
1264
                empty
 
1265
              }
 
1266
            )
 
1267
         }|
 
1268
 
 
1269
         ## Apply wind forcing specified by stress or wind velocity.
 
1270
         ## Replaces windy.dat and windy.py
 
1271
         element type {
 
1272
            attribute name { "wind_forcing" },
 
1273
            (
 
1274
               ## Wind forcing with user specified wind stress
 
1275
               ##
 
1276
               ## <b> Note that the stress needs to be specified
 
1277
               ## using the same density units as the reference_density 
 
1278
               ## under equation of state.</b>So if you use the recommended
 
1279
               ## non-dimensional value of 1.0 for reference_density and
 
1280
               ## your calculated stress is in kg m^-1s^-2 and the dimensional
 
1281
               ## reference_density is 1000.0 kg m^-3, you need to divide
 
1282
               ## the calculated stress in SI units by 1000.0.
 
1283
               element wind_stress {
 
1284
                  input_choice_real_dim_minus_one_vector|
 
1285
                  element from_netcdf {
 
1286
                     ## The format of this file should conform to NetCDF CF 1.x
 
1287
                     ## (http://cf-pcmdi.llnl.gov/).
 
1288
                     attribute file_name { xsd:string },
 
1289
                     attribute east_west { xsd:string },
 
1290
                     attribute north_south { xsd:string },
 
1291
                     comment
 
1292
                  }
 
1293
               }|
 
1294
               ## Wind forcing with user specified 10m wind velocity
 
1295
               element wind_velocity {
 
1296
                  ## Specify wind drag coefficient (dimensionless)
 
1297
                  ## Suggested value: 4.0e-4
 
1298
                  element wind_drag_coefficient {
 
1299
                     input_choice_real
 
1300
                  },
 
1301
                  ## Density of air. 
 
1302
                  ##
 
1303
                  ## <b>Note that you have to specify
 
1304
                  ## this density in the same units as the 
 
1305
                  ## reference_density under equation of state.</b>
 
1306
                  ## So with a typicial value of rho_air=1.3 kgm^-3
 
1307
                  ## and rho_water=1000 kgm^-3, if you fill in the 
 
1308
                  ## recommended (non-dimensional) value of 1.0 for 
 
1309
                  ## reference_density, this field needs to be 1.3e-3.
 
1310
                  element density_air {
 
1311
                     real
 
1312
                  },
 
1313
                  ## Specify wind velocity
 
1314
                  element wind_velocity {
 
1315
                     input_choice_real_dim_minus_one_vector|
 
1316
                     element from_netcdf {
 
1317
                        ## The format of this file should conform to NetCDF CF 1.x
 
1318
                        ## (http://cf-pcmdi.llnl.gov/)
 
1319
                        attribute file_name { xsd:string },
 
1320
                        attribute east_west { xsd:string },
 
1321
                        attribute north_south { xsd:string },
 
1322
                        comment
 
1323
                     }
 
1324
                  }
 
1325
               }
 
1326
            )
 
1327
         }|
 
1328
 
 
1329
         ## When using control_volumes under Pressure
 
1330
         ## spatial_discretisation or when using
 
1331
         ## integrate_continuity_by_parts with continuous_galerkin
 
1332
         ## Pressure and continuous_galerkin Velocity this
 
1333
         ## boundary condition type imposes a weak no normal flow
 
1334
         ## boundary condition on the surface_ids specified.
 
1335
         element type {
 
1336
            attribute name { "no_normal_flow" },
 
1337
            empty
 
1338
         }|
 
1339
 
 
1340
         ## Implements a penalty function for the near wall region.
 
1341
         ## Using this option coarse meshes can
 
1342
         ## be used in the near wall region.
 
1343
         ##
 
1344
         ## Should be used in combination with a no_normal_flow condition. 
 
1345
         ##
 
1346
         ## See Bazilevs et al. 2007
 
1347
         element type{
 
1348
            attribute name { "near_wall_treatment" },
 
1349
            element tolerance {real}
 
1350
         }|
 
1351
         ## Log law of the wall
 
1352
         ##
 
1353
         ## Should be used in combination with a no_normal_flow condition. 
 
1354
         element type{
 
1355
            attribute name { "log_law_of_wall" },
 
1356
            element surface_roughness {real}
 
1357
         }
 
1358
      )
 
1359
   )
 
1360
   
 
1361
# Output options for prognostic fields
 
1362
prognostic_scalar_output_options =
 
1363
   (
 
1364
      ## Specify what is written to vtu dump files
 
1365
      element output {
 
1366
         ## By default each field in the options file is written to vtu.
 
1367
         ## Select this option to exclude this field.
 
1368
         element exclude_from_vtu {
 
1369
            empty
 
1370
         }?,
 
1371
         ## Select this option to also write the values of this field
 
1372
         ## on the previous timestep.
 
1373
         ## (included under the name: Old<field_name> )
 
1374
         element include_previous_time_step {
 
1375
            empty
 
1376
         }?,
 
1377
         ## Select this option to also write the values of this field
 
1378
         ## used in the nonlinear iteration.
 
1379
         ## (included under the name: Nonlinear<field_name> )
 
1380
         element include_nonlinear_field {
 
1381
            empty
 
1382
         }?,
 
1383
         ## Output a file details the convergence (or otherwise) of
 
1384
         ## this field with every advective nonlinear
 
1385
         ## iteration.
 
1386
         ## ONLY WORKS FOR PURE CONTROL VOLUME DISCRETISATIONS.
 
1387
         element convergence_file {
 
1388
            comment
 
1389
         }?
 
1390
      }
 
1391
   )
 
1392
 
 
1393
# Output options for pressure (can't have a convergence file)
 
1394
pressure_output_options =
 
1395
   (
 
1396
      ## Specify what is written to vtu dump files
 
1397
      element output {
 
1398
         ## By default each field in the options file is written to vtu.
 
1399
         ## Select this option to exclude this field.
 
1400
         element exclude_from_vtu {
 
1401
            empty
 
1402
         }?,
 
1403
         ## Select this option to also write the values of this field
 
1404
         ## on the previous timestep.
 
1405
         ## (included under the name: Old<field_name> )
 
1406
         element include_previous_time_step {
 
1407
            empty
 
1408
         }?,
 
1409
         ## Select this option to also write the values of this field
 
1410
         ## used in the nonlinear iteration.
 
1411
         ## (included under the name: Nonlinear<field_name> )
 
1412
         element include_nonlinear_field {
 
1413
            empty
 
1414
         }?,
 
1415
         ## Write out some extra debugging vtu files that can be used
 
1416
         ## to analyse what goes on in the pressure projection steps.
 
1417
         ## WARNING: this may create a huge amount of vtu files, as 
 
1418
         ## multiple files are written per nonlinear iteration.
 
1419
         element debugging_vtus {
 
1420
            empty
 
1421
         }?
 
1422
      }
 
1423
   )
 
1424
 
 
1425
# Output options for prognostic fields
 
1426
prognostic_vector_output_options =
 
1427
   (
 
1428
      ## Specify what is written to vtu dump files
 
1429
      element output {
 
1430
         ## By default each field in the options file is written to vtu.
 
1431
         ## Select this option to exclude this field.
 
1432
         element exclude_from_vtu {
 
1433
            empty
 
1434
         }?,
 
1435
         ## Select this option to also write the values of this field
 
1436
         ## on the previous timestep.
 
1437
         ## (included under the name: Old<field_name> )
 
1438
         element include_previous_time_step {
 
1439
            empty
 
1440
         }?,
 
1441
         ## Select this option to also write the values of this field
 
1442
         ## used in the nonlinear iteration.
 
1443
         ## (included under the name: Nonlinear<field_name> )
 
1444
         element include_nonlinear_field {
 
1445
            empty
 
1446
         }?
 
1447
      }
 
1448
   )
 
1449
   
 
1450
# Output options for all other fields
 
1451
field_output_options =
 
1452
   (
 
1453
      ## Specify what is written to vtu dump files
 
1454
      element output {
 
1455
         ## By default each field in the options file is written to vtu.
 
1456
         ## Select this option to exclude this field.
 
1457
         element exclude_from_vtu {
 
1458
            empty
 
1459
         }?
 
1460
      }
 
1461
   )
 
1462
   
 
1463
diagnostic_output_options = field_output_options
 
1464
prescribed_output_options = field_output_options
 
1465
 
 
1466
# Options for inclusion/exclusion of standard field statistics from the .stat
 
1467
# file
 
1468
include_stat =
 
1469
   (
 
1470
      ## Include this field in the .stat file (magnitude and components)
 
1471
      element include_in_stat {
 
1472
         comment
 
1473
      }
 
1474
   )
 
1475
exclude_components_from_stat =
 
1476
   (
 
1477
      ## Include just the magnitude of this field in the .stat file
 
1478
      ## (excluding the components)
 
1479
      element exclude_components_from_stat {
 
1480
         comment
 
1481
      }
 
1482
   )
 
1483
exclude_stat =
 
1484
   (
 
1485
      ## Exclude this field from the .stat file.
 
1486
      element exclude_from_stat {
 
1487
         comment
 
1488
      }
 
1489
   )
 
1490
 
 
1491
# Diagnostic statistics options for prognostic scalar fields
 
1492
prognostic_scalar_stat_options = 
 
1493
   (
 
1494
      ## Specify what is added to .stat files
 
1495
      element stat {
 
1496
        prognostic_scalar_stat_options.stat
 
1497
      }
 
1498
   )
 
1499
  
 
1500
# Diagnostic statistics for all other scalar fields
 
1501
prognostic_scalar_stat_no_old_or_nonlinear_options =
 
1502
   (
 
1503
      ## Specify what is added to .stat files
 
1504
      element stat {
 
1505
         prognostic_scalar_stat_no_old_or_nonlinear_options.stat
 
1506
         
 
1507
      }
 
1508
   )
 
1509
 
 
1510
diagnostic_scalar_stat_options = prognostic_scalar_stat_no_old_or_nonlinear_options
 
1511
prescribed_scalar_stat_options = prognostic_scalar_stat_no_old_or_nonlinear_options
 
1512
 
 
1513
# Combining of stat elements for scalar fields
 
1514
prognostic_scalar_stat_options.stat = prognostic_scalar_stat_no_old_or_nonlinear_options.stat
 
1515
prognostic_scalar_stat_options.stat &=
 
1516
   (
 
1517
      ## Enable to include the previous timestep value of this field in the .stat file.
 
1518
      element include_previous_time_step {
 
1519
         comment
 
1520
      }?,
 
1521
      ## Enable to include the values of this field in the nonlinear
 
1522
      ## iteration in the .stat file.
 
1523
      element include_nonlinear_field {
 
1524
         comment
 
1525
      }?
 
1526
   )
 
1527
prognostic_scalar_stat_no_old_or_nonlinear_options.stat = 
 
1528
   (
 
1529
      exclude_stat?,
 
1530
      cv_stats?,
 
1531
      surface_integral_stats_scalar*,
 
1532
      mixing_stats*
 
1533
   )   
 
1534
   
 
1535
# Diagnostic statistics options for vector fields, with enabled by default
 
1536
vector_field_stat_options_enabled_default = include_stat
 
1537
vector_field_stat_options_enabled_default |= exclude_components_from_stat
 
1538
vector_field_stat_options_enabled_default |= exclude_stat
 
1539
 
 
1540
# Diagnostic statistics options for vector fields, with enabled by default
 
1541
vector_field_stat_options_disabled_default = exclude_stat
 
1542
vector_field_stat_options_disabled_default |= exclude_components_from_stat
 
1543
vector_field_stat_options_disabled_default |= include_stat
 
1544
 
 
1545
# Diagnostic statistics for prognostic vector fields
 
1546
prognostic_vector_stat_options =
 
1547
   (
 
1548
      ## Specify what is added to .stat files
 
1549
      element stat {
 
1550
         (
 
1551
            prognostic_vector_stat_options.stat
 
1552
         )
 
1553
      }      
 
1554
   )
 
1555
 
 
1556
# Diagnostic statistics for all other vector fields
 
1557
prognostic_vector_stat_no_old_or_nonlinear_options =
 
1558
   (
 
1559
      ## Specify what is added to .stat files
 
1560
      element stat {
 
1561
         prognostic_vector_stat_no_old_or_nonlinear_options.stat
 
1562
      }
 
1563
   )
 
1564
diagnostic_vector_stat_options = prognostic_vector_stat_no_old_or_nonlinear_options
 
1565
prescribed_vector_stat_options = prognostic_vector_stat_no_old_or_nonlinear_options
 
1566
 
 
1567
# Combining of stat elements for vector fields
 
1568
prognostic_vector_stat_options.stat = prognostic_vector_stat_no_old_or_nonlinear_options.stat
 
1569
prognostic_vector_stat_options.stat &=
 
1570
   (
 
1571
      ## Specify how the previous timestep value of this field is added to the .stat file.
 
1572
      element previous_time_step {
 
1573
         vector_field_stat_options_disabled_default
 
1574
      },
 
1575
      ## Specify how the values of this field used in the nonlinear iteration are added to the .stat file.
 
1576
      element nonlinear_field {
 
1577
         vector_field_stat_options_disabled_default
 
1578
      },
 
1579
      ## What surface IDs do you want to do the calculation over?
 
1580
      element compute_body_forces_on_surfaces {
 
1581
         integer_vector
 
1582
      }?
 
1583
   )
 
1584
prognostic_vector_stat_no_old_or_nonlinear_options.stat =
 
1585
   (
 
1586
      vector_field_stat_options_enabled_default,
 
1587
      surface_integral_stats_vector*
 
1588
   )
 
1589
 
 
1590
# Convergence options for prognostic scalar fields
 
1591
scalar_convergence_options =
 
1592
   (
 
1593
      ## Decide whether this field is tested for convergence
 
1594
      ## during nonlinear iterations
 
1595
      ## (if /timestepping/nonlinear_iterations and
 
1596
      ## /timestepping/nonlinear_iterations/tolerance are
 
1597
      ## enabled).
 
1598
      ## Also specifies whether the field is added to the 
 
1599
      ## convergence file (if /io/convergence_file is enabled).
 
1600
      element convergence {
 
1601
         (
 
1602
            ## Include this field in convergence testing
 
1603
            ## (if /timestepping/nonlinear_iterations and
 
1604
            ## /timestepping/nonlinear_iterations/tolerance are
 
1605
            ## enabled) and file (if /io/convergence_file is enabled)
 
1606
            element include_in_convergence {
 
1607
               comment
 
1608
            }|
 
1609
            ## Exclude this field from convergence testing and file 
 
1610
            element exclude_from_convergence {
 
1611
               comment
 
1612
            }
 
1613
         )
 
1614
      }
 
1615
   )
 
1616
 
 
1617
# Convergence statistics options for prognostic vector fields (velocity)
 
1618
vector_convergence_options =
 
1619
   (
 
1620
      ## Decide whether this field is tested for convergence
 
1621
      ## during nonlinear iterations
 
1622
      ## (if /timestepping/nonlinear_iterations and
 
1623
      ## /timestepping/nonlinear_iterations/tolerance are
 
1624
      ## enabled).
 
1625
      ## Also specifies whether the field is added to the 
 
1626
      ## convergence file (if /io/convergence_file is enabled).
 
1627
      element convergence {
 
1628
         (
 
1629
            ## Include this field (magnitude and components)
 
1630
            ## in convergence testing
 
1631
            ## (if /timestepping/nonlinear_iterations and
 
1632
            ## /timestepping/nonlinear_iterations/tolerance are
 
1633
            ## enabled) and file (if /io/convergence_file is enabled)
 
1634
            element include_in_convergence {
 
1635
               comment
 
1636
            }|
 
1637
            ## Include just the magnitude of this field 
 
1638
            ## in convergence testing
 
1639
            ## (if /timestepping/nonlinear_iterations and
 
1640
            ## /timestepping/nonlinear_iterations/tolerance are
 
1641
            ## enabled) and file (if /io/convergence_file is enabled)
 
1642
            ## i.e. excluding the components
 
1643
            element exclude_components_from_convergence {
 
1644
               comment
 
1645
            }|
 
1646
            ## Exclude this field entirely from convergence testing and file 
 
1647
            element exclude_from_convergence {
 
1648
               comment
 
1649
            }
 
1650
         )
 
1651
      }
 
1652
   )
 
1653
 
 
1654
# Steady state options for prognostic scalar fields
 
1655
scalar_steady_state_options =
 
1656
   (
 
1657
      ## Decide whether this field is tested for a steady state
 
1658
      ## between timesteps
 
1659
      ## (if /timestepping/steady_state is
 
1660
      ## enabled).
 
1661
      element steady_state {
 
1662
         (
 
1663
            ## Include this field in steady state testing
 
1664
            ## (if /timestepping/steady_state is
 
1665
            ## enabled)
 
1666
            element include_in_steady_state {
 
1667
               comment
 
1668
            }|
 
1669
            ## Exclude this field from steady state testing
 
1670
            element exclude_from_steady_state {
 
1671
               comment
 
1672
            }
 
1673
         )
 
1674
      }
 
1675
   )
 
1676
 
 
1677
# Steady state statistics options for prognostic vector fields (velocity)
 
1678
vector_steady_state_options =
 
1679
   (
 
1680
      ## Decide whether this field is tested for a steady state
 
1681
      ## between timesteps
 
1682
      ## (if /timestepping/steady_state is
 
1683
      ## enabled).
 
1684
      element steady_state {
 
1685
         (
 
1686
            ## Include this field (magnitude and components)
 
1687
            ## in steady state testing
 
1688
            ## (if /timestepping/steady_state is enabled)
 
1689
            element include_in_steady_state {
 
1690
               comment
 
1691
            }|
 
1692
            ## Include just the magnitude of this field 
 
1693
            ## in steady state testing
 
1694
            ## (if /timestepping/steady_state is
 
1695
            ## enabled)
 
1696
            ## i.e. excluding the components
 
1697
            element exclude_components_from_steady_state {
 
1698
               comment
 
1699
            }|
 
1700
            ## Exclude this field entirely from convergence testing and file 
 
1701
            element exclude_from_steady_state {
 
1702
               comment
 
1703
            }
 
1704
         )
 
1705
      }
 
1706
   )
 
1707
 
 
1708
# Options for whether a field is to be included in detector output.
 
1709
detector_options_enabled_default = 
 
1710
   (
 
1711
      ## Specify what is added to detector files
 
1712
      element detectors {
 
1713
         (
 
1714
            ## This field is output at each detector location.
 
1715
            element include_in_detectors {
 
1716
               comment
 
1717
            }|
 
1718
            ## This field is not output at detector locations.
 
1719
            element exclude_from_detectors {
 
1720
               comment
 
1721
            }
 
1722
         )
 
1723
      }
 
1724
   )
 
1725
 
 
1726
# Options for whether a field is to be included in detector output.
 
1727
detector_options_disabled_default = 
 
1728
   (
 
1729
      ## Specify what is added to detector files
 
1730
      element detectors {
 
1731
         (
 
1732
            ## This field is not output at detector locations.
 
1733
            element exclude_from_detectors {
 
1734
               comment
 
1735
            }|
 
1736
            ## This field is output at each detector location.
 
1737
            element include_in_detectors {
 
1738
               comment
 
1739
            }
 
1740
         )
 
1741
      }
 
1742
   )
 
1743
 
 
1744
# Detector output defaults on for prognostic and diagnostic fields, 
 
1745
# off for prescribed.
 
1746
prognostic_detector_options = detector_options_enabled_default
 
1747
diagnostic_detector_options = detector_options_enabled_default
 
1748
prescribed_detector_options = detector_options_disabled_default
 
1749
 
 
1750
adaptivity_preprocessing =
 
1751
      ## Occasionally, it is desirable to apply operations or filters
 
1752
      ## to fields before using them for the purposes of adaptivity.
 
1753
      element preprocessing {
 
1754
        (
 
1755
            ## Invert a helmholtz operator to smooth out the field
 
1756
            ## before using it to adapt. This can help with noisy
 
1757
            ## fields.
 
1758
            element helmholtz_smoother {
 
1759
                 element smoothing_length_scale {
 
1760
                     real_dim_symmetric_tensor
 
1761
                 },
 
1762
                 element solver {
 
1763
                   linear_solver_options_sym
 
1764
                 }
 
1765
            }
 
1766
        )
 
1767
      }?
 
1768
 
 
1769
generic_aliased_field =
 
1770
   (
 
1771
      attribute material_phase_name { xsd:string },
 
1772
      attribute field_name { xsd:string }
 
1773
   )
 
1774
 
 
1775
# Most common mesh choices
 
1776
mesh_choice = 
 
1777
   (
 
1778
      element mesh {
 
1779
         attribute name { xsd:string }
 
1780
      }|
 
1781
      element mesh {
 
1782
         attribute name { "CoordinateMesh" }
 
1783
      }|
 
1784
      element mesh {
 
1785
         attribute name { "VelocityMesh" }
 
1786
      }|
 
1787
      element mesh {
 
1788
         attribute name { "PressureMesh" }
 
1789
      }
 
1790
   )
 
1791
 
 
1792
# Not really a choice, for fields that have to be on the velocity mesh
 
1793
# currently that's all scalar fields, except pressure
 
1794
# and of course velocity itself
 
1795
# If you want to implement scalar fields on other meshes, feel free to do so
 
1796
# but bare in mind you need to make sure the field stays outside RMEM.
 
1797
# Currently all scalar fields are packed in RMEM with length nonods
 
1798
velocity_mesh_choice =
 
1799
   (
 
1800
      (
 
1801
         element mesh {
 
1802
            attribute name { "VelocityMesh" }
 
1803
         }|
 
1804
         element mesh {
 
1805
            attribute name { "PressureMesh" }
 
1806
         }|
 
1807
         element mesh {
 
1808
            attribute name { "CoordinateMesh" }
 
1809
         }|
 
1810
         element mesh {
 
1811
            attribute name { string }
 
1812
         }
 
1813
      )
 
1814
   )
 
1815
 
 
1816
pressure_mesh_choice =
 
1817
   (
 
1818
      (
 
1819
         element mesh {
 
1820
            attribute name { "PressureMesh" }
 
1821
         }|
 
1822
         element mesh {
 
1823
            attribute name { "VelocityMesh" }
 
1824
         }|
 
1825
         element mesh {
 
1826
            attribute name { "CoordinateMesh" }
 
1827
         }|
 
1828
         element mesh {
 
1829
            attribute name { string }
 
1830
         }
 
1831
      )
 
1832
   )
 
1833
 
 
1834
# This is the choice of additional scalar field to be solved for
 
1835
scalar_field_choice =
 
1836
   (
 
1837
# The first is a generic field, which may be used for any user-defined field
 
1838
# that FLUIDITY knows nothing about, or a generic diagnostic
 
1839
      (
 
1840
         element scalar_field {
 
1841
            attribute rank { "0" },
 
1842
            attribute name { xsd:string },
 
1843
            ## Field type
 
1844
            (
 
1845
               element prognostic {
 
1846
                  velocity_mesh_choice,
 
1847
                  prognostic_scalar_field
 
1848
               }|
 
1849
               element prescribed {
 
1850
                  velocity_mesh_choice,
 
1851
                  prescribed_scalar_field
 
1852
               }|
 
1853
               element diagnostic {
 
1854
                  scalar_diagnostic_algorithms,
 
1855
                  velocity_mesh_choice,
 
1856
                  diagnostic_scalar_field
 
1857
               }|
 
1858
               element aliased {
 
1859
                  generic_aliased_field
 
1860
               }
 
1861
            )
 
1862
         }|
 
1863
         ## Prognostic scalar fields below this
 
1864
         element ___Prognostic_Fields_Below___ {
 
1865
            empty
 
1866
         }|
 
1867
 
 
1868
# This is the long list of fields that FLUIDITY knows about
 
1869
# -- First is a list of fields that are primarily prognostic,
 
1870
#    but can be set to prescribed, or aliased...
 
1871
# -- The list is in order of most frequently used.
 
1872
 
 
1873
         ## Salinity
 
1874
         element scalar_field {
 
1875
            attribute rank { "0" },
 
1876
            attribute name { "Salinity" },
 
1877
            attribute replaces { "IDENT = 42" },
 
1878
            (
 
1879
               element prognostic {
 
1880
                  velocity_mesh_choice,
 
1881
                  prognostic_scalar_field
 
1882
               }|
 
1883
               element prescribed {
 
1884
                  velocity_mesh_choice,
 
1885
                  prescribed_scalar_field
 
1886
               }|
 
1887
               element aliased {
 
1888
                  generic_aliased_field
 
1889
               }
 
1890
            )
 
1891
         }|
 
1892
         ## Temperature
 
1893
         element scalar_field {
 
1894
            attribute rank { "0" },
 
1895
            attribute name { "Temperature" },
 
1896
            attribute replaces { "IDENT = -1" },
 
1897
            (
 
1898
               element prognostic {
 
1899
                  velocity_mesh_choice,
 
1900
                  prognostic_scalar_field
 
1901
               }|
 
1902
               element prescribed {
 
1903
                  velocity_mesh_choice,
 
1904
                  prescribed_scalar_field
 
1905
               }|
 
1906
               element aliased {
 
1907
                  generic_aliased_field
 
1908
               }
 
1909
            )
 
1910
         }|
 
1911
         ## Background Temperature
 
1912
         element scalar_field {
 
1913
            attribute rank { "0" },
 
1914
            attribute name { "BackgroundTemperature" },
 
1915
            (
 
1916
               element prescribed {
 
1917
                  velocity_mesh_choice,
 
1918
                  prescribed_scalar_field
 
1919
               }
 
1920
            )
 
1921
         }|
 
1922
         ## Passive Tracer
 
1923
         element scalar_field {
 
1924
            attribute rank { "0" },
 
1925
            attribute name { "Tracer" },
 
1926
            attribute replaces { "IDENT = 666" },
 
1927
            (
 
1928
               element prognostic {
 
1929
                  velocity_mesh_choice,
 
1930
                  prognostic_scalar_field
 
1931
               }|
 
1932
               element prescribed {
 
1933
                  velocity_mesh_choice,
 
1934
                  prescribed_scalar_field
 
1935
               }|
 
1936
               element aliased {
 
1937
                  generic_aliased_field
 
1938
               }
 
1939
            )
 
1940
         }|
 
1941
         ## Free Surface
 
1942
         ## NOTE: the prognostic FreeSurface field only works with the
 
1943
         ## legacy_continuous_galerkin code path
 
1944
         ## NOTE: if you are using the free_surface boundary condition
 
1945
         ## applied to the Velocity field (recommended), you should not 
 
1946
         ## use the prognostic FreeSurface field. In this case you may 
 
1947
         ## (optionally) add a diagnostic FreeSurface field.
 
1948
         element scalar_field {
 
1949
            attribute rank { "0" },
 
1950
            attribute name { "FreeSurface" },
 
1951
            (
 
1952
               ## Free Surface
 
1953
               ## NOTE: the prognostic FreeSurface field only works with the
 
1954
               ## legacy_continuous_galerkin code path
 
1955
               element prognostic {
 
1956
                  ## Note that this is not the quadratic mesh balance pressure is
 
1957
                  ## actually calculated on, but the linear mesh it is projected back
 
1958
                  ## on for output purposes.
 
1959
                  element mesh {
 
1960
                     attribute name { "VelocityMesh" }
 
1961
                  },
 
1962
                  prognostic_free_surface_field
 
1963
               }|
 
1964
               ## Free Surface
 
1965
               ## NOTE: the diagnostic FreeSurface field only works in combination
 
1966
               ## with the free_surface boundary condition applied to the Velocity
 
1967
               ## field. It gives you a 3D field (constant over the vertical)
 
1968
               ## of the free surface elevation.
 
1969
               element diagnostic {
 
1970
                  internal_algorithm,
 
1971
                  # this is hard-coded on the PressureMesh as long as the Pressure is
 
1972
                  # if this is no longer true, it should be option-checked to be on the
 
1973
                  # same mesh as Pressure
 
1974
                  ## Must be on the same mesh as Pressure
 
1975
                  element mesh {
 
1976
                     attribute name { "PressureMesh" }
 
1977
                  },
 
1978
                  diagnostic_scalar_field
 
1979
               }
 
1980
               
 
1981
            )
 
1982
         }|
 
1983
         ## Second Fluid
 
1984
         element scalar_field {
 
1985
            attribute rank { "0" },
 
1986
            attribute name { "SecondFluid" },
 
1987
            attribute replaces { "IDENT = 56" },
 
1988
            (
 
1989
               element prognostic {
 
1990
                  velocity_mesh_choice,
 
1991
                  prognostic_scalar_field
 
1992
               }|
 
1993
               element prescribed {
 
1994
                  velocity_mesh_choice,
 
1995
                  prescribed_scalar_field
 
1996
               }|
 
1997
               element aliased {
 
1998
                  generic_aliased_field
 
1999
               }
 
2000
            )
 
2001
         }|
 
2002
         ## Diffuse Interface
 
2003
         element scalar_field {
 
2004
            attribute rank { "0" },
 
2005
            attribute name { "DiffuseInterface" },
 
2006
            attribute replaces { "IDENT = 57" },
 
2007
            (
 
2008
               element prognostic {
 
2009
                  velocity_mesh_choice,
 
2010
                  prognostic_scalar_field
 
2011
               }|
 
2012
               element prescribed {
 
2013
                  velocity_mesh_choice,
 
2014
                  prescribed_scalar_field
 
2015
               }|
 
2016
               element aliased {
 
2017
                  generic_aliased_field
 
2018
               }
 
2019
            )
 
2020
         }|
 
2021
         ## If enabled, decomposes Pressure by solving for the balanced part of 
 
2022
         ## Pressure using a "geopressure" solver:
 
2023
         ## 
 
2024
         ##   f = - grad p_gp + g
 
2025
         ##
 
2026
         ## By choosing an appropriate mesh (typically velocity mesh order + 1)
 
2027
         ## for the balanced part of pressure, physical balance can be
 
2028
         ## represented to a higher degree of accuracy.
 
2029
         element scalar_field {
 
2030
            attribute rank { "0" },
 
2031
            attribute name { "GeostrophicPressure" },
 
2032
            attribute replaces { "IDENT = -2003" },
 
2033
            (
 
2034
               element prognostic {
 
2035
                  ## The GeostrophicPressure mesh
 
2036
                  ## 
 
2037
                  ## <b>WARNING: It is usual for this to be a higher degree
 
2038
                  ## mesh than the velocity mesh</b>
 
2039
                  element mesh {
 
2040
                     attribute name { xsd:string },
 
2041
                     comment
 
2042
                  },
 
2043
                  prognostic_geostrophic_pressure_field
 
2044
               }
 
2045
            )
 
2046
         }|
 
2047
         element scalar_field {
 
2048
            attribute rank { "0" },
 
2049
            attribute name { "VerticalBalancePressure" },
 
2050
            (
 
2051
               element prognostic {
 
2052
                  ## This needs to be a quadratic DG mesh
 
2053
                  mesh_choice,
 
2054
                  prognostic_vertical_balance_pressure_field
 
2055
               }
 
2056
            )
 
2057
         }|
 
2058
         ## MaterialVolumeFraction field:
 
2059
         ##
 
2060
         ## Volume fraction of this material.
 
2061
         ## Required in multimaterial simulations.
 
2062
         ##  - if prognostic solves for the volume fraction
 
2063
         ##  - if prescribed uses a specified volume fraction
 
2064
         ##  - if diagnostic solves for the final material volume fraction
 
2065
         ## Only 1 diagnostic MaterialVolumeFraction field allowed per
 
2066
         ## simulation or solves for all the volume fractions based on
 
2067
         ## the SumMaterialVolumeFractions field.
 
2068
         ## 
 
2069
         ## A diagnostic MaterialVolumeFraction field is currently required for
 
2070
         ## compressible multimaterial simulations (even if only 1 material).
 
2071
         ## Generally also requires a MaterialDensity field.
 
2072
         element scalar_field {
 
2073
            attribute rank { "0" },
 
2074
            attribute name { "MaterialVolumeFraction" },
 
2075
            (
 
2076
               element prognostic {
 
2077
                  velocity_mesh_choice,
 
2078
                  prognostic_scalar_field,
 
2079
                  cap_option?,
 
2080
                  surface_tension_option?
 
2081
               }|
 
2082
               element diagnostic {
 
2083
                  internal_algorithm,
 
2084
                  velocity_mesh_choice,
 
2085
                  diagnostic_scalar_field,
 
2086
                  cap_option?
 
2087
               }|
 
2088
               element prescribed {
 
2089
                  velocity_mesh_choice,
 
2090
                  prescribed_scalar_field,
 
2091
                  cap_option?
 
2092
               }|
 
2093
               element aliased {
 
2094
                  generic_aliased_field
 
2095
               }
 
2096
            )
 
2097
         }|
 
2098
         ## MaterialDensity field:
 
2099
         ##
 
2100
         ## Field for the density of this material.
 
2101
         ## Required in multimaterial simulations.
 
2102
         ##  - prescribed if an incompressible simulation
 
2103
         ##  - diagnostic if using a linear equation of state
 
2104
         ##  - prognostic if a compressible simulation
 
2105
         ## (note that if you set a multimaterial
 
2106
         ## equation of state and this field is
 
2107
         ## prognostic then its initial condition
 
2108
         ## will be overwritten by the density that
 
2109
         ## satisfies the initial pressure and
 
2110
         ## the equation of state)
 
2111
         element scalar_field {
 
2112
            attribute rank { "0" },
 
2113
            attribute name { "MaterialDensity" },
 
2114
            (
 
2115
               element prognostic {
 
2116
                  velocity_mesh_choice,
 
2117
                  prognostic_scalar_field
 
2118
               }|
 
2119
               element diagnostic {
 
2120
                  internal_algorithm,
 
2121
                  velocity_mesh_choice,
 
2122
                  diagnostic_scalar_field
 
2123
               }|
 
2124
               element prescribed {
 
2125
                  velocity_mesh_choice,
 
2126
                  prescribed_scalar_field
 
2127
               }|
 
2128
               element aliased {
 
2129
                  generic_aliased_field
 
2130
               }
 
2131
            )
 
2132
         }|
 
2133
         ## MaterialInternalEnergy field:
 
2134
         ##
 
2135
         ## Field for the internal energy of this material.
 
2136
         ## Required in multimaterial compressible simulations
 
2137
         ## with full miegrunneisen (perfect gas) eos.
 
2138
         element scalar_field {
 
2139
            attribute rank { "0" },
 
2140
            attribute name { "MaterialInternalEnergy" },
 
2141
            (
 
2142
               element prognostic {
 
2143
                  velocity_mesh_choice,
 
2144
                  prognostic_scalar_field
 
2145
               }|
 
2146
               element aliased {
 
2147
                  generic_aliased_field
 
2148
               }
 
2149
            )
 
2150
         }|
 
2151
         ## SumMaterialVolumeFractions field:
 
2152
         ##
 
2153
         ## Sums the prognostic MaterialVolumeFraction fields.
 
2154
         ## - diagnostic: sums all the volume fractions in the other
 
2155
         ##   material phases
 
2156
         element scalar_field {
 
2157
            attribute rank { "0" },
 
2158
            attribute name { "SumMaterialVolumeFractions" },
 
2159
            (
 
2160
               element diagnostic {
 
2161
                  internal_algorithm,
 
2162
                  velocity_mesh_choice,
 
2163
                  diagnostic_scalar_field
 
2164
               }|
 
2165
               element aliased {
 
2166
                  generic_aliased_field
 
2167
               }
 
2168
            )
 
2169
         }|
 
2170
         ## CopiedField - This field copies the previous timesteps
 
2171
         ## values from another (specified) field at every iteration
 
2172
         ## and then solves the field using different (again, specified)
 
2173
         ## scheme and solution options.
 
2174
         ## For instance, this field can be used to create a diffused
 
2175
         ## field to adapt to.
 
2176
         ## Unless someone requests otherwise this is only currently possible
 
2177
         ## for fields within the same material_phase.
 
2178
         element scalar_field {
 
2179
            attribute rank { "0" },
 
2180
            attribute name { "CopiedField" },
 
2181
            (
 
2182
               element prognostic {
 
2183
                  velocity_mesh_choice,
 
2184
                  attribute copy_from_field { string },
 
2185
                  prognostic_scalar_field
 
2186
               }
 
2187
            )
 
2188
         }|
 
2189
         ## Calculate the stream function of 2D incompressible flow. Note 
 
2190
         ## that this *only* makes sense for proper 2D (not pseudo-2D) simulations.
 
2191
         ## Requires a continuous mesh.
 
2192
         element scalar_field {
 
2193
            attribute rank { "0" },
 
2194
            attribute name { "StreamFunction" },
 
2195
            (
 
2196
               element prognostic {
 
2197
                  mesh_choice,
 
2198
                  prognostic_stream_function_field
 
2199
               }
 
2200
            )
 
2201
         }|
 
2202
         ## Phytoplankton
 
2203
         element scalar_field {
 
2204
            attribute rank { "0" },
 
2205
            attribute name { "Phytoplankton" },
 
2206
            (
 
2207
               element prognostic {
 
2208
                  velocity_mesh_choice,
 
2209
                  prognostic_scalar_field
 
2210
               }|
 
2211
               element prescribed {
 
2212
                  velocity_mesh_choice,
 
2213
                  prescribed_scalar_field
 
2214
               }
 
2215
            )
 
2216
         }|
 
2217
         ## Zooplankton
 
2218
         element scalar_field {
 
2219
            attribute rank { "0" },
 
2220
            attribute name { "Zooplankton" },
 
2221
            (
 
2222
               element prognostic {
 
2223
                  velocity_mesh_choice,
 
2224
                  prognostic_scalar_field
 
2225
               }|
 
2226
               element prescribed {
 
2227
                  velocity_mesh_choice,
 
2228
                  prescribed_scalar_field
 
2229
               }
 
2230
            )
 
2231
         }|
 
2232
         ## Nutrient
 
2233
         element scalar_field {
 
2234
            attribute rank { "0" },
 
2235
            attribute name { "Nutrient" },
 
2236
            (
 
2237
               element prognostic {
 
2238
                  velocity_mesh_choice,
 
2239
                  prognostic_scalar_field
 
2240
               }|
 
2241
               element prescribed {
 
2242
                  velocity_mesh_choice,
 
2243
                  prescribed_scalar_field
 
2244
               }
 
2245
            )
 
2246
         }|
 
2247
         ## Detritus
 
2248
         element scalar_field {
 
2249
            attribute rank { "0" },
 
2250
            attribute name { "Detritus" },
 
2251
            (
 
2252
               element prognostic {
 
2253
                  velocity_mesh_choice,
 
2254
                  prognostic_scalar_field
 
2255
               }|
 
2256
               element prescribed {
 
2257
                  velocity_mesh_choice,
 
2258
                  prescribed_scalar_field
 
2259
               }
 
2260
            )
 
2261
         }|
 
2262
 
 
2263
         ## PhaseVolumeFraction:
 
2264
         ## Required in porous_media problem type
 
2265
         element scalar_field {
 
2266
            attribute rank { "0" },
 
2267
            attribute name { "PhaseVolumeFraction" },
 
2268
            (
 
2269
               element prognostic {
 
2270
                  velocity_mesh_choice,
 
2271
                  prognostic_scalar_field
 
2272
               }|
 
2273
               element prescribed {
 
2274
                  velocity_mesh_choice,
 
2275
                  prescribed_scalar_field
 
2276
               }
 
2277
            )
 
2278
         }|
 
2279
 
 
2280
         ## Electrical Potential:
 
2281
         ## Required in electrokinetic, electrothermal
 
2282
         ## and electrochemical problems
 
2283
         ## (sub-option of porous_media problem type)
 
2284
         element scalar_field {
 
2285
            attribute rank { "0" },
 
2286
            attribute name { "ElectricalPotential" },
 
2287
            (
 
2288
               element prognostic {
 
2289
                  velocity_mesh_choice,
 
2290
                  prognostic_scalar_field
 
2291
               }
 
2292
            )
 
2293
         }|
 
2294
 
 
2295
         # Insert new prognostic scalar fields here using the template:
 
2296
         #        element scalar_field {
 
2297
         #            attribute rank { "0" },
 
2298
         #            attribute name { "NewFieldName" },
 
2299
         #            (
 
2300
         #               element prognostic {
 
2301
         #                  velocity_mesh_choice,
 
2302
         #                  prognostic_scalar_field
 
2303
         #               }|
 
2304
         #               element prescribed {
 
2305
         #                  velocity_mesh_choice,
 
2306
         #                  prescribed_scalar_field
 
2307
         #               }|
 
2308
         #               element aliased {
 
2309
         #                  generic_aliased_field
 
2310
         #               }
 
2311
         #            )
 
2312
         #        }
 
2313
         
 
2314
# -- Second is a list of fields that are primarily prescribed,
 
2315
#    but can be aliased. An example is wind velocity.
 
2316
# -- The list is in order of most frequently used.
 
2317
 
 
2318
         ## Prescribed scalar fields below this
 
2319
         element ___Prescribed_fields_below___ {
 
2320
            empty
 
2321
         }|
 
2322
         element scalar_field {
 
2323
            attribute rank { "0" },
 
2324
            attribute name { "DistanceToSideBoundaries" },
 
2325
            attribute replaces { "IDENT = -144" },
 
2326
            (
 
2327
               element prescribed {
 
2328
                  velocity_mesh_choice,
 
2329
                  prescribed_scalar_field
 
2330
               }|
 
2331
               element aliased {
 
2332
                  generic_aliased_field
 
2333
               }
 
2334
            )
 
2335
         }|
 
2336
         ## MaterialFrictionAngle for multimaterial
 
2337
         ## plasticity problems
 
2338
         ##
 
2339
         ## Requires a diagnostic bulk FrictionAngle field
 
2340
         ## - not tested yet
 
2341
         element scalar_field {
 
2342
            attribute rank { "0" },
 
2343
            attribute name { "MaterialFrictionAngle" },
 
2344
            (
 
2345
               element prescribed {
 
2346
                  velocity_mesh_choice,
 
2347
                  prescribed_scalar_field
 
2348
               }|
 
2349
               element aliased {
 
2350
                  generic_aliased_field
 
2351
               }
 
2352
            )
 
2353
         }|
 
2354
         ## MaterialCohesion for multimaterial
 
2355
         ## plasticity problems
 
2356
         ##
 
2357
         ## Requires a diagnostic bulk Cohesion field
 
2358
         ## - not tested yet
 
2359
         element scalar_field {
 
2360
            attribute rank { "0" },
 
2361
            attribute name { "MaterialCohesion" },
 
2362
            (
 
2363
               element prescribed {
 
2364
                  velocity_mesh_choice,
 
2365
                  prescribed_scalar_field
 
2366
               }|
 
2367
               element aliased {
 
2368
                  generic_aliased_field
 
2369
               }
 
2370
            )
 
2371
         }|
 
2372
#
 
2373
# Insert new prescribed scalar fields here using the template:
 
2374
#        element scalar_field {
 
2375
#            attribute rank { "0" },
 
2376
#            attribute name { "NewFieldName" },
 
2377
#            (
 
2378
#               element prescribed {
 
2379
#                  velocity_mesh_choice,
 
2380
#                  prescribed_scalar_field
 
2381
#               }|
 
2382
#               element aliased {
 
2383
#                  generic_aliased_field
 
2384
#               }
 
2385
#            )
 
2386
#        }
 
2387
#
 
2388
# -- Last is a list of fields that are primarily diagnostic,
 
2389
#    but can be aliased. An example is Tidal Range.
 
2390
# -- The list is in order of most frequently used.
 
2391
#
 
2392
         ## Diagnostic scalar fields below this
 
2393
         element ___Diagnostic_Fields_Below___ {
 
2394
            empty
 
2395
         }|
 
2396
         element scalar_field {
 
2397
            attribute rank { "0" },
 
2398
            attribute name { "PerturbationDensity" },
 
2399
            attribute replaces { "IDENT = -143" },
 
2400
            (
 
2401
               element diagnostic {
 
2402
                  internal_algorithm,
 
2403
                  velocity_mesh_choice,
 
2404
                  diagnostic_scalar_field
 
2405
               }|
 
2406
               element aliased {
 
2407
                  generic_aliased_field
 
2408
               }
 
2409
            )
 
2410
         }|
 
2411
         ## ControlVolumeDivergence:
 
2412
         ##
 
2413
         ## div field
 
2414
         ##
 
2415
         ## Divergence of the velocity field where
 
2416
         ## the divergence operator is defined using
 
2417
         ## the control volume C^T matrix.
 
2418
         ## This assumes that the test space is discontinuous
 
2419
         ## control volumes.
 
2420
         element scalar_field {
 
2421
            attribute rank { "0" },
 
2422
            attribute name { "ControlVolumeDivergence" },
 
2423
            (
 
2424
               element diagnostic {
 
2425
                  internal_algorithm,
 
2426
                  attribute field_name { string },
 
2427
                  velocity_mesh_choice,
 
2428
                  diagnostic_cv_divergence_scalar_field
 
2429
               }|
 
2430
               element aliased {
 
2431
                  generic_aliased_field
 
2432
               }
 
2433
            )
 
2434
         }|
 
2435
         ## Diffusive dissipation
 
2436
         element scalar_field {
 
2437
            attribute rank { "0" },
 
2438
            attribute name { "DiffusiveDissipation" },
 
2439
            (
 
2440
               element diagnostic {
 
2441
                  internal_algorithm,
 
2442
                  velocity_mesh_choice,
 
2443
                  diagnostic_scalar_field
 
2444
               }|
 
2445
               element aliased {
 
2446
                  generic_aliased_field
 
2447
               }
 
2448
            )
 
2449
         }|
 
2450
         ## Viscous dissipation
 
2451
         element scalar_field {
 
2452
            attribute rank { "0" },
 
2453
            attribute name { "ViscousDissipation" },
 
2454
            (
 
2455
               element diagnostic {
 
2456
                  internal_algorithm,
 
2457
                  velocity_mesh_choice,
 
2458
                  diagnostic_scalar_field
 
2459
               }|
 
2460
               element aliased {
 
2461
                  generic_aliased_field
 
2462
               }
 
2463
            )
 
2464
         }|
 
2465
         ## Richardson Number:
 
2466
         ##
 
2467
         ##  Ri = \frac{N^2}{(\frac{\partial u}{\partial z})^2 + (\frac{\partial u}{\partial z})^2}
 
2468
         ## with 
 
2469
         ##  N^2 = -\frac{g}{\rho_0}\frac{\partial \rho}{\partial z}
 
2470
         ##
 
2471
         ## Limitations:
 
2472
         ##  - Gravity must be constant.
 
2473
         ##  - Assumes gravity is in -ve final coordinate direction.
 
2474
         element scalar_field {
 
2475
            attribute rank { "0" },
 
2476
            attribute name { "RichardsonNumber" },
 
2477
            attribute depends { "Velocity,PerturbationDensity" },
 
2478
            (
 
2479
               element diagnostic {
 
2480
                  internal_algorithm,
 
2481
                  velocity_mesh_choice,
 
2482
                  diagnostic_richardson_number_field
 
2483
               }|
 
2484
               element aliased {
 
2485
                  generic_aliased_field
 
2486
               }
 
2487
            )
 
2488
         }|
 
2489
         ## CFLNumber
 
2490
         ##
 
2491
         ## See http://amcg.ese.ic.ac.uk/index.php?title=Local:Diagnostics#CFL_Number
 
2492
         ##
 
2493
         ## Adapting to this field is not recommended
 
2494
         element scalar_field {
 
2495
            attribute rank { "0" },
 
2496
            attribute name { "CFLNumber" },
 
2497
            attribute replaces { "IDENT = -601" },
 
2498
            (
 
2499
               element diagnostic {
 
2500
                  internal_algorithm,
 
2501
                  velocity_mesh_choice,
 
2502
                  diagnostic_scalar_field
 
2503
               }|
 
2504
               element aliased {
 
2505
                  generic_aliased_field
 
2506
               }
 
2507
            )
 
2508
         }|
 
2509
         ## ControlVolumeCFLNumber
 
2510
         ##
 
2511
         ## Courant Number as defined on a control volume mesh
 
2512
         ##
 
2513
         ## Adapting to this field is not recommended
 
2514
         element scalar_field {
 
2515
            attribute rank { "0" },
 
2516
            attribute name { "ControlVolumeCFLNumber" },
 
2517
            (
 
2518
               element diagnostic {
 
2519
                  internal_algorithm,
 
2520
                  velocity_mesh_choice,
 
2521
                  diagnostic_scalar_field
 
2522
               }|
 
2523
               element aliased {
 
2524
                  generic_aliased_field
 
2525
               }
 
2526
            )
 
2527
         }|
 
2528
         ## DG_CourantNumber
 
2529
         ##
 
2530
         ## Courant Number as defined on a DG mesh
 
2531
         ##
 
2532
         ## Adapting to this field is not recommended
 
2533
         element scalar_field {
 
2534
            attribute rank { "0" },
 
2535
            attribute name { "DG_CourantNumber" },
 
2536
            (
 
2537
               element diagnostic {
 
2538
                  internal_algorithm,
 
2539
                  velocity_mesh_choice,
 
2540
                  diagnostic_scalar_field
 
2541
               }|
 
2542
               element aliased {
 
2543
                  generic_aliased_field
 
2544
               }
 
2545
            )
 
2546
         }|
 
2547
         ## CVMaterialDensityCFLNumber
 
2548
         ##
 
2549
         ## Courant Number as defined on a control volume mesh and
 
2550
         ## incorporating the MaterialDensity.
 
2551
         ## Requires a MaterialDensity field!
 
2552
         ##
 
2553
         ## Adapting to this field is not recommended
 
2554
         element scalar_field {
 
2555
            attribute rank { "0" },
 
2556
            attribute name { "CVMaterialDensityCFLNumber" },
 
2557
            (
 
2558
               element diagnostic {
 
2559
                  internal_algorithm,
 
2560
                  velocity_mesh_choice,
 
2561
                  diagnostic_scalar_field
 
2562
               }|
 
2563
               element aliased {
 
2564
                  generic_aliased_field
 
2565
               }
 
2566
            )
 
2567
         }|
 
2568
         element scalar_field {
 
2569
            attribute rank { "0" },
 
2570
            attribute name { "SolidConcentration" },
 
2571
            (
 
2572
               element diagnostic {
 
2573
                  internal_algorithm,
 
2574
                  velocity_mesh_choice,
 
2575
                  diagnostic_scalar_field
 
2576
               }|
 
2577
               element aliased {
 
2578
                  generic_aliased_field
 
2579
               }
 
2580
            )
 
2581
         }|
 
2582
         ## This scalar field is meant to replace DENTRAF.
 
2583
         ## Basically, if you use new options, DENTRAF is no longer needed
 
2584
         ## No repointing is done from this field to DENTRAF.
 
2585
         element scalar_field {
 
2586
            attribute rank { "0" },
 
2587
            attribute name { "CopyofDensity" },
 
2588
            attribute replaces { "DENTRAF" },
 
2589
            (
 
2590
               element diagnostic {
 
2591
                  internal_algorithm,
 
2592
                  velocity_mesh_choice,
 
2593
                  diagnostic_scalar_field
 
2594
               }
 
2595
            )
 
2596
         }|
 
2597
         ## Add field to be used by Solid_configuration to 
 
2598
         ## Visualize the solids and MaterialVolumeFraction together
 
2599
         element scalar_field {
 
2600
            attribute rank { "0" },
 
2601
            attribute name { "VisualizeSolidFluid" },
 
2602
            (
 
2603
               element diagnostic {
 
2604
                  internal_algorithm,
 
2605
                  velocity_mesh_choice,
 
2606
                  diagnostic_scalar_field
 
2607
               }
 
2608
            )
 
2609
         }|
 
2610
         ## Add field to be used by Solid_configuration to 
 
2611
         ## Visualize the solid_Concentration
 
2612
         element scalar_field {
 
2613
            attribute rank { "0" },
 
2614
            attribute name { "VisualizeSolid" },
 
2615
            (
 
2616
               element diagnostic {
 
2617
                  internal_algorithm,
 
2618
                  velocity_mesh_choice,
 
2619
                  diagnostic_scalar_field
 
2620
               }
 
2621
            )
 
2622
         }|
 
2623
         ## Add field to be used by Solid_configuration to 
 
2624
         ## map  the solid_Concentration from particle mesh to 
 
2625
         ## the fluid mesh.
 
2626
         element scalar_field {
 
2627
            attribute rank { "0" },
 
2628
            attribute name { "ParticleScalar" },
 
2629
            (
 
2630
               element diagnostic {
 
2631
                  internal_algorithm,
 
2632
                  mesh_choice,
 
2633
                  diagnostic_scalar_field
 
2634
               }
 
2635
            )
 
2636
         }|
 
2637
         ## Add field to be used by Explicit_ALE to 
 
2638
         ## visualize functional values before iterations start.
 
2639
         element scalar_field {
 
2640
            attribute rank { "0" },
 
2641
            attribute name { "FunctionalBegin" },
 
2642
            (
 
2643
               element diagnostic {
 
2644
                  internal_algorithm,
 
2645
                  mesh_choice,
 
2646
                  diagnostic_scalar_field
 
2647
               }
 
2648
            )
 
2649
         }|
 
2650
         ## Add field to be used by Explicit_ALE to 
 
2651
         ## visualize functional values at each iteration.
 
2652
         element scalar_field {
 
2653
            attribute rank { "0" },
 
2654
            attribute name { "FunctionalIter" },
 
2655
            (
 
2656
               element diagnostic {
 
2657
                  internal_algorithm,
 
2658
                  mesh_choice,
 
2659
                  diagnostic_scalar_field
 
2660
               }
 
2661
            )
 
2662
         }|
 
2663
         ## add a MaterialVolume scalar_field to calculate the spatially varying 
 
2664
         ## volume of a material (requires a MaterialVolumeFraction)
 
2665
         element scalar_field {
 
2666
            attribute rank { "0" },
 
2667
            attribute name { "MaterialVolume" },
 
2668
            (
 
2669
               element diagnostic {
 
2670
                  internal_algorithm,
 
2671
                  velocity_mesh_choice,
 
2672
                  diagnostic_scalar_field
 
2673
               }|
 
2674
               element aliased {
 
2675
                  generic_aliased_field
 
2676
               }
 
2677
            )
 
2678
         }|
 
2679
         ## add a MaterialMass scalar_field to calculate the spatially varying 
 
2680
         ## mass of a material (requires a MaterialVolumeFraction and a MaterialDensity)
 
2681
         element scalar_field {
 
2682
            attribute rank { "0" },
 
2683
            attribute name { "MaterialMass" },
 
2684
            (
 
2685
               element diagnostic {
 
2686
                  internal_algorithm,
 
2687
                  velocity_mesh_choice,
 
2688
                  diagnostic_scalar_field
 
2689
               }|
 
2690
               element aliased {
 
2691
                  generic_aliased_field
 
2692
               }
 
2693
            )
 
2694
         }|
 
2695
         ## Calculates the MaterialDensity based on the bulk Pressure
 
2696
         ## (and MaterialInternalEnergy if appropriate) for the equation
 
2697
         ## of state of this material.
 
2698
         element scalar_field {
 
2699
            attribute rank { "0" },
 
2700
            attribute name { "MaterialEOSDensity" },
 
2701
            (
 
2702
               element diagnostic {
 
2703
                  internal_algorithm,
 
2704
                  velocity_mesh_choice,
 
2705
                  diagnostic_scalar_field
 
2706
               }|
 
2707
               element aliased {
 
2708
                  generic_aliased_field
 
2709
               }
 
2710
            )
 
2711
         }|
 
2712
         ## Calculates the MaterialPressure based on the MaterialDensity
 
2713
         ## (and MaterialInternalEnergy if appropriate) for the equation
 
2714
         ## of state of this material.
 
2715
         element scalar_field {
 
2716
            attribute rank { "0" },
 
2717
            attribute name { "MaterialPressure" },
 
2718
            (
 
2719
               element diagnostic {
 
2720
                  internal_algorithm,
 
2721
                  velocity_mesh_choice,
 
2722
                  diagnostic_scalar_field
 
2723
               }|
 
2724
               element aliased {
 
2725
                  generic_aliased_field
 
2726
               }
 
2727
            )
 
2728
         }|
 
2729
         ## Calculates the BulkMaterialPressure based on the MaterialDensity
 
2730
         ## and MaterialVolumeFraction (and MaterialInternalEnergy if appropriate) 
 
2731
         ## for the equation of state of all materials.
 
2732
         element scalar_field {
 
2733
            attribute rank { "0" },
 
2734
            attribute name { "BulkMaterialPressure" },
 
2735
            (
 
2736
               element diagnostic {
 
2737
                  internal_algorithm,
 
2738
                  velocity_mesh_choice,
 
2739
                  diagnostic_scalar_field
 
2740
               }|
 
2741
               element aliased {
 
2742
                  generic_aliased_field
 
2743
               }
 
2744
            )
 
2745
         }|
 
2746
         ## Grid Reynolds number
 
2747
         element scalar_field {
 
2748
            attribute rank { "0" },
 
2749
            attribute name { "GridReynoldsNumber" },
 
2750
            (element diagnostic {
 
2751
               internal_algorithm,
 
2752
               element mesh {
 
2753
                  attribute name { "VelocityMesh" }
 
2754
               },
 
2755
               diagnostic_scalar_field
 
2756
            }
 
2757
            | element aliased { generic_aliased_field })
 
2758
         }|
 
2759
         ## GridPecletNumber
 
2760
         ##
 
2761
         ## Peclet Number Pe = U*dx/2*diffusivity
 
2762
         ##
 
2763
         ## Also see the test case 'grid_peclet_number'
 
2764
         ## if you wish to see the effect of changing the 
 
2765
         ## diffusivity on a 1D, cg-discretised tracer-field
 
2766
         ##
 
2767
         ## Adapting to this field is not recommended
 
2768
         element scalar_field {
 
2769
            attribute rank { "0" },
 
2770
            attribute name { "GridPecletNumber" },
 
2771
            (
 
2772
               element diagnostic {
 
2773
                  internal_algorithm,
 
2774
                  ## Mesh on which to calculate dx
 
2775
                  mesh_choice,
 
2776
                  ## This is the name of the scalar field
 
2777
                  ## to calculate the Peclet number for
 
2778
                  ## Note this field needs to have a diffusivity
 
2779
                  element field_name { string },
 
2780
                  diagnostic_scalar_field
 
2781
               }|
 
2782
               element aliased {
 
2783
                  generic_aliased_field
 
2784
               }
 
2785
            )
 
2786
         }|
 
2787
         ## Horizontal velocity divergence:
 
2788
         ##
 
2789
         ## div_H velocity
 
2790
         ##
 
2791
         ## Uses the gravity field direction to determine the horizontal plane.
 
2792
         element scalar_field {
 
2793
            attribute rank { "0" },
 
2794
            attribute name { "HorizontalVelocityDivergence" },
 
2795
            (
 
2796
               element diagnostic {
 
2797
                  internal_algorithm,
 
2798
                  velocity_mesh_choice,
 
2799
                  diagnostic_scalar_field
 
2800
               }|
 
2801
               element aliased {
 
2802
                  generic_aliased_field
 
2803
               }
 
2804
            )
 
2805
         }|
 
2806
 
 
2807
         ## Velocity divergence:
 
2808
         ##
 
2809
         ## div velocity
 
2810
         ##
 
2811
         element scalar_field {
 
2812
            attribute rank { "0" },
 
2813
            attribute name { "VelocityDivergence" },
 
2814
            (
 
2815
               element diagnostic {
 
2816
                  internal_algorithm,
 
2817
                  velocity_mesh_choice,
 
2818
                  diagnostic_scalar_field
 
2819
               }|
 
2820
               element aliased {
 
2821
                  generic_aliased_field
 
2822
               }
 
2823
            )
 
2824
         }|
 
2825
 
 
2826
         ## Vorticity for a 2D field:
 
2827
         ##
 
2828
         ##  du   dv
 
2829
         ##  -- - --
 
2830
         ##  dy   dx
 
2831
         element scalar_field {
 
2832
            attribute rank { "0" },
 
2833
            attribute name { "Vorticity2D" },
 
2834
            (
 
2835
               element diagnostic {
 
2836
                  internal_algorithm,
 
2837
                  mesh_choice,
 
2838
                  diagnostic_scalar_field
 
2839
               }|
 
2840
               element aliased {
 
2841
                  generic_aliased_field
 
2842
               }
 
2843
            )
 
2844
         }|
 
2845
         
 
2846
         ## Kinetic energy density:
 
2847
         ##
 
2848
         ##  1/2 rho_0*|u|^2
 
2849
         ##
 
2850
         ## where rho_0 is the (reference) density 
 
2851
         ##
 
2852
         ## Limitations:
 
2853
         ##  - The Density, PerturbationDensity, KineticEnergyDensity and Velocity fields must be on the same mesh.
 
2854
         element scalar_field {
 
2855
            attribute rank { "0" },
 
2856
            attribute name { "KineticEnergyDensity" },
 
2857
            (
 
2858
               element diagnostic {
 
2859
                  internal_algorithm,
 
2860
                  velocity_mesh_choice,
 
2861
                  diagnostic_scalar_field
 
2862
               }|
 
2863
               element aliased {
 
2864
                  generic_aliased_field
 
2865
               }
 
2866
            )
 
2867
         }|
 
2868
         
 
2869
         ## Gravitational potential energy density:
 
2870
         ##
 
2871
         ## rho_0*(1.0 + rho')*(g dot (r - r_0))
 
2872
         ##
 
2873
         ## where rho_0 is the (reference) density, rho' is the perturbation density and r_0 is the potential energy zero point.
 
2874
         ##
 
2875
         ## Limitations:
 
2876
         ##  - Requires a constant gravity direction.
 
2877
         ##  - The Density, PerturbationDensity and GravitationalPotentialEnergyDensity fields must be on the same mesh.
 
2878
         element scalar_field {
 
2879
            attribute rank { "0" },
 
2880
            attribute name { "GravitationalPotentialEnergyDensity" },
 
2881
            (
 
2882
               element diagnostic {
 
2883
                  internal_algorithm,
 
2884
                  velocity_mesh_choice,
 
2885
                  diagnostic_scalar_field,
 
2886
                  ## Coordinate of a point with a potential energy of zero.
 
2887
                  element zero_point {
 
2888
                     real_dim_vector
 
2889
                  }
 
2890
               }|
 
2891
               element aliased {
 
2892
                  generic_aliased_field
 
2893
               }
 
2894
            )
 
2895
         }|
 
2896
         ## Isopycnal coordinate
 
2897
         ##
 
2898
         ##  z_star(x,t) = 1/A int_V' H(rho(x',t)-rho(x,t)) dV'
 
2899
         ##
 
2900
         ## where rho is the density, A is the width/area of the domain
 
2901
         ##
 
2902
         ## Limitations:
 
2903
         ##  - You need to specify a (fine) mesh to redistribute the PerturbationDensity onto
 
2904
         ##  - Requires a constant gravity direction.
 
2905
         ##  - The Density, PerturbationDensity and GravitationalPotentialEnergyDensity fields must be on the same mesh.
 
2906
         element scalar_field {
 
2907
            attribute rank { "0" },
 
2908
            attribute name { "IsopycnalCoordinate" },
 
2909
            (
 
2910
               element diagnostic {
 
2911
                  internal_algorithm,
 
2912
                  velocity_mesh_choice,
 
2913
                  ## This is the mesh onto which we redistribute the PerturbationDensity
 
2914
                  element fine_mesh {
 
2915
                     attribute name { string }
 
2916
                  },
 
2917
                  diagnostic_scalar_field                 
 
2918
               }|
 
2919
               element aliased {
 
2920
                  generic_aliased_field
 
2921
               }
 
2922
            )
 
2923
         }|
 
2924
         ## Background potential energy density:
 
2925
         ##
 
2926
         ## PE_b = rho*z_star
 
2927
         ##
 
2928
         ## where rho is the density, z_star is the isopycnal coordinate
 
2929
         ##
 
2930
         ## Limitations:
 
2931
         ##  - Requires a constant gravity direction.
 
2932
         ##  - The Density, PerturbationDensity and
 
2933
         ##  GravitationalPotentialEnergyDensity fields must be on the
 
2934
         ##  same mesh.
 
2935
         element scalar_field {
 
2936
            attribute rank { "0" },
 
2937
            attribute name { "BackgroundPotentialEnergyDensity" },
 
2938
            (
 
2939
               element diagnostic {
 
2940
                  internal_algorithm,
 
2941
                  velocity_mesh_choice,
 
2942
                  diagnostic_scalar_field                 
 
2943
               }|
 
2944
               element aliased {
 
2945
                  generic_aliased_field
 
2946
               }
 
2947
            )
 
2948
         }|
 
2949
         
 
2950
         ## Ertel potential vorticity:
 
2951
         ##
 
2952
         ##  (f + curl u) dot grad rho'
 
2953
         ##
 
2954
         ## Limitations:
 
2955
         ##  - Requires a geometry dimension of 3.
 
2956
         element scalar_field {
 
2957
            attribute rank { "0" },
 
2958
            attribute name { "PotentialVorticity" },
 
2959
            attribute depends { "Velocity,PerturbationDensity" },
 
2960
            (
 
2961
               element diagnostic {
 
2962
                  internal_algorithm,
 
2963
                  velocity_mesh_choice,
 
2964
                  diagnostic_scalar_field
 
2965
               }|
 
2966
               element aliased {
 
2967
                  generic_aliased_field
 
2968
               }
 
2969
            )
 
2970
         }|
 
2971
         ## Relative potential vorticity:
 
2972
         ##
 
2973
         ##   curl u dot grad rho'
 
2974
         element scalar_field {
 
2975
            attribute rank { "0" },
 
2976
            attribute name { "RelativePotentialVorticity" },
 
2977
            attribute depends { "Velocity,PerturbationDensity" },
 
2978
            (
 
2979
              element diagnostic {
 
2980
                  internal_algorithm,
 
2981
                  velocity_mesh_choice,
 
2982
                  diagnostic_scalar_field
 
2983
               }|
 
2984
               element aliased {
 
2985
                  generic_aliased_field
 
2986
               }
 
2987
            )
 
2988
         }|         
 
2989
         ## Local average mesh edge lengths
 
2990
         element scalar_field {
 
2991
          attribute rank { "0" },
 
2992
            attribute name { "MeshEdgeLengths" },
 
2993
            (
 
2994
              element diagnostic {
 
2995
                  internal_algorithm,
 
2996
                  element mesh {
 
2997
                     attribute name { "CoordinateMesh" }
 
2998
                  },
 
2999
                  diagnostic_scalar_field
 
3000
               }|
 
3001
               element aliased {
 
3002
                  generic_aliased_field
 
3003
               }
 
3004
            )
 
3005
         }|
 
3006
         ## Calculate the horizontal stream function psi where:
 
3007
         ##   \partial_x \psi = -v
 
3008
         ##   \partial_y \psi = u
 
3009
         ## where u and v are perpendicular to the gravity direction. Applies a
 
3010
         ## strong Dirichlet boundary condition of 0 on all boundaries.
 
3011
         element scalar_field {
 
3012
            attribute rank { "0" },
 
3013
            attribute name { "HorizontalStreamFunction" },
 
3014
            attribute depends { "Velocity" },
 
3015
            (
 
3016
              element diagnostic {
 
3017
                  internal_algorithm,
 
3018
                  velocity_mesh_choice,
 
3019
                  ## Solver
 
3020
                  element solver {
 
3021
                     linear_solver_options_sym
 
3022
                  },
 
3023
                  diagnostic_scalar_field
 
3024
               }|
 
3025
               element aliased {
 
3026
                  generic_aliased_field
 
3027
               }
 
3028
            )
 
3029
         }|
 
3030
         ## Speed:
 
3031
         ##
 
3032
         ##  |u|
 
3033
         ##
 
3034
         ## Limitations:
 
3035
         ##  - The Speed and Velocity fields must be on the same mesh.
 
3036
         element scalar_field {
 
3037
            attribute rank { "0" },
 
3038
            attribute name { "Speed" },
 
3039
            (
 
3040
               element diagnostic {
 
3041
                  internal_algorithm,
 
3042
                  velocity_mesh_choice,
 
3043
                  diagnostic_scalar_field
 
3044
               }|
 
3045
               element aliased {
 
3046
                  generic_aliased_field
 
3047
               }
 
3048
            )
 
3049
         }|
 
3050
 
 
3051
         ## Volume of the vehicles
 
3052
         ##
 
3053
         ## used in Traffic Modelling
 
3054
         element scalar_field {
 
3055
            attribute rank { "0" },
 
3056
            attribute name { "SolidPhase" },
 
3057
            attribute raplaces { "IDENT = -42"},
 
3058
            (
 
3059
               element diagnostic {
 
3060
                  internal_algorithm,
 
3061
                  velocity_mesh_choice,
 
3062
                  diagnostic_scalar_field
 
3063
               }|
 
3064
               element aliased {
 
3065
                  generic_aliased_field
 
3066
               }
 
3067
            )
 
3068
         }|
 
3069
         ## Absolute Difference between two scalar fields.
 
3070
         ##
 
3071
         ## Both fields must be in this material_phase.
 
3072
         ## Assumes both fields are on the same mesh as the AbsoluteDifference field.
 
3073
         element scalar_field {
 
3074
            attribute rank { "0" },
 
3075
            attribute name { "AbsoluteDifference" },
 
3076
            (
 
3077
               element diagnostic {
 
3078
                  internal_algorithm,
 
3079
                  attribute field_name_a { string },
 
3080
                  attribute field_name_b { string },
 
3081
                  mesh_choice,
 
3082
                  diagnostic_scalar_field,
 
3083
                  ## Evaluate the absolute difference once the average difference has been removed?
 
3084
                  element relative_to_average {
 
3085
                    empty
 
3086
                  }?,
 
3087
                  ## Ignore boundary nodes (i.e. zero them when calculating the difference)
 
3088
                  element ignore_boundaries {
 
3089
                    empty
 
3090
                  }?
 
3091
               }|
 
3092
               element aliased {
 
3093
                  generic_aliased_field
 
3094
               }
 
3095
            )
 
3096
         }|
 
3097
 
 
3098
         ## Absolute Difference between two scalar fields.
 
3099
         ##
 
3100
         ## Both fields must be in this material_phase.
 
3101
         ## Assumes both fields are on the same mesh as the AbsoluteDifference field.
 
3102
         element scalar_field {
 
3103
            attribute rank { "0" },
 
3104
            attribute name { "ScalarAbsoluteDifference" },
 
3105
            (
 
3106
               element diagnostic {
 
3107
                  internal_algorithm,
 
3108
                  attribute field_name_a { string },
 
3109
                  attribute field_name_b { string },
 
3110
                  mesh_choice,
 
3111
                  diagnostic_scalar_field,
 
3112
                  ## Evaluate the absolute difference once the average difference has been removed?
 
3113
                  element relative_to_average {
 
3114
                    empty
 
3115
                  }?,
 
3116
                  ## Ignore boundary nodes (i.e. zero them when calculating the difference)
 
3117
                  element ignore_boundaries {
 
3118
                    empty
 
3119
                  }?
 
3120
               }|
 
3121
               element aliased {
 
3122
                  generic_aliased_field
 
3123
               }
 
3124
            )
 
3125
         }|
 
3126
         ## Galerkin projection of one field onto another mesh.
 
3127
         ##
 
3128
         ## The field must be in this material_phase.
 
3129
         ## 
 
3130
         ## NOTE: you need the solver options if the mesh
 
3131
         ## of this field is continuous.
 
3132
         element scalar_field {
 
3133
            attribute rank { "0" },
 
3134
            attribute name { "GalerkinProjection" },
 
3135
            (
 
3136
               element diagnostic {
 
3137
                  internal_algorithm,
 
3138
                  element source_field_name { string },
 
3139
                  mesh_choice,
 
3140
                  ## Lump the mass matrix of the galerkin projection
 
3141
                  ## less accurate but faster and might give smoother result.                  
 
3142
                  element lump_mass {
 
3143
                     empty
 
3144
                  }?,
 
3145
                  element solver {
 
3146
                    linear_solver_options_sym
 
3147
                  }?,
 
3148
                  diagnostic_scalar_field
 
3149
               }|
 
3150
               element aliased {
 
3151
                  generic_aliased_field
 
3152
               }
 
3153
            )
 
3154
         }|
 
3155
         ## Primary production of Phytoplankton. This is calculated by
 
3156
         ## the ocean biology module and will not be calculated unless
 
3157
         ## ocean biology is being simulated.
 
3158
         element scalar_field {
 
3159
            attribute rank { "0" },
 
3160
            attribute name { "PrimaryProduction" },
 
3161
            (
 
3162
               element diagnostic {
 
3163
                  internal_algorithm,
 
3164
                  velocity_mesh_choice,
 
3165
                  diagnostic_scalar_field
 
3166
               }|
 
3167
               element aliased {
 
3168
                  generic_aliased_field
 
3169
               }
 
3170
            )
 
3171
         }|
 
3172
         ## Grazing of Phytoplankton by Zooplankton. This is calculated by
 
3173
         ## the ocean biology module and will not be calculated unless
 
3174
         ## ocean biology is being simulated.
 
3175
         element scalar_field {
 
3176
            attribute rank { "0" },
 
3177
            attribute name { "PhytoplanktonGrazing" },
 
3178
            (
 
3179
               element diagnostic {
 
3180
                  internal_algorithm,
 
3181
                  velocity_mesh_choice,
 
3182
                  diagnostic_scalar_field
 
3183
               }|
 
3184
               element aliased {
 
3185
                  generic_aliased_field
 
3186
               }
 
3187
            )
 
3188
 
 
3189
         }|
 
3190
         element scalar_field {
 
3191
            attribute rank { "0" },
 
3192
            attribute name { "TidalRange" },
 
3193
            attribute replaces { "IDENT = -32" },
 
3194
            (
 
3195
               element diagnostic {
 
3196
                  internal_algorithm,
 
3197
                  velocity_mesh_choice,
 
3198
                  diagnostic_scalar_field_tidal_range
 
3199
               }|
 
3200
               element aliased {
 
3201
                  generic_aliased_field
 
3202
               }
 
3203
            )
 
3204
         }|
 
3205
         element scalar_field {
 
3206
            attribute rank { "0" },
 
3207
            attribute name { "MaxFreeSurface" },
 
3208
            attribute replaces { "IDENT = -33" },
 
3209
            (
 
3210
               element diagnostic {
 
3211
                  internal_algorithm,
 
3212
                  velocity_mesh_choice,
 
3213
                  diagnostic_scalar_field
 
3214
               }|
 
3215
               element aliased {
 
3216
                  generic_aliased_field
 
3217
               }
 
3218
            )
 
3219
         }|
 
3220
         element scalar_field {
 
3221
            attribute rank { "0" },
 
3222
            attribute name { "MinFreeSurface" },
 
3223
            attribute replaces { "IDENT = -34" },
 
3224
            (
 
3225
               element diagnostic {
 
3226
                  internal_algorithm,
 
3227
                  velocity_mesh_choice,
 
3228
                  diagnostic_scalar_field
 
3229
               }|
 
3230
               element aliased {
 
3231
                  generic_aliased_field
 
3232
               }
 
3233
            )
 
3234
         }|
 
3235
         element scalar_field {
 
3236
            attribute rank { "0" },
 
3237
            attribute name { "HarmonicAmplitudeM2" },
 
3238
            (
 
3239
               element diagnostic {
 
3240
                  internal_algorithm,
 
3241
                  velocity_mesh_choice,
 
3242
                  diagnostic_scalar_field
 
3243
               }|
 
3244
               element aliased {
 
3245
                  generic_aliased_field
 
3246
               }
 
3247
            )
 
3248
         }|
 
3249
         element scalar_field {
 
3250
            attribute rank { "0" },
 
3251
            attribute name { "HarmonicPhaseM2" },
 
3252
            (
 
3253
               element diagnostic {
 
3254
                  internal_algorithm,
 
3255
                  velocity_mesh_choice,
 
3256
                  diagnostic_scalar_field
 
3257
               }|
 
3258
               element aliased {
 
3259
                  generic_aliased_field
 
3260
               }
 
3261
            )
 
3262
         }|
 
3263
         element scalar_field {
 
3264
            attribute rank { "0" },
 
3265
            attribute name { "HarmonicAmplitudeS2" },
 
3266
            (
 
3267
               element diagnostic {
 
3268
                  internal_algorithm,
 
3269
                  velocity_mesh_choice,
 
3270
                  diagnostic_scalar_field
 
3271
               }|
 
3272
               element aliased {
 
3273
                  generic_aliased_field
 
3274
               }
 
3275
            )
 
3276
         }|
 
3277
         element scalar_field {
 
3278
            attribute rank { "0" },
 
3279
            attribute name { "HarmonicPhaseS2" },
 
3280
            (
 
3281
               element diagnostic {
 
3282
                  internal_algorithm,
 
3283
                  velocity_mesh_choice,
 
3284
                  diagnostic_scalar_field
 
3285
               }|
 
3286
               element aliased {
 
3287
                  generic_aliased_field
 
3288
               }
 
3289
            )
 
3290
         }|
 
3291
         element scalar_field {
 
3292
            attribute rank { "0" },
 
3293
            attribute name { "HarmonicAmplitudeN2" },
 
3294
            (
 
3295
               element diagnostic {
 
3296
                  internal_algorithm,
 
3297
                  velocity_mesh_choice,
 
3298
                  diagnostic_scalar_field
 
3299
               }|
 
3300
               element aliased {
 
3301
                  generic_aliased_field
 
3302
               }
 
3303
            )
 
3304
         }|
 
3305
         element scalar_field {
 
3306
            attribute rank { "0" },
 
3307
            attribute name { "HarmonicPhaseN2" },
 
3308
            (
 
3309
               element diagnostic {
 
3310
                  internal_algorithm,
 
3311
                  velocity_mesh_choice,
 
3312
                  diagnostic_scalar_field
 
3313
               }|
 
3314
               element aliased {
 
3315
                  generic_aliased_field
 
3316
               }
 
3317
            )
 
3318
         }|
 
3319
         element scalar_field {
 
3320
            attribute rank { "0" },
 
3321
            attribute name { "HarmonicAmplitudeK2" },
 
3322
            (
 
3323
               element diagnostic {
 
3324
                  internal_algorithm,
 
3325
                  velocity_mesh_choice,
 
3326
                  diagnostic_scalar_field
 
3327
               }|
 
3328
               element aliased {
 
3329
                  generic_aliased_field
 
3330
               }
 
3331
            )
 
3332
         }|
 
3333
         element scalar_field {
 
3334
            attribute rank { "0" },
 
3335
            attribute name { "HarmonicPhaseK2" },
 
3336
            (
 
3337
               element diagnostic {
 
3338
                  internal_algorithm,
 
3339
                  velocity_mesh_choice,
 
3340
                  diagnostic_scalar_field
 
3341
               }|
 
3342
               element aliased {
 
3343
                  generic_aliased_field
 
3344
               }
 
3345
            )
 
3346
         }|
 
3347
         element scalar_field {
 
3348
            attribute rank { "0" },
 
3349
            attribute name { "HarmonicAmplitudeK1" },
 
3350
            (
 
3351
               element diagnostic {
 
3352
                  internal_algorithm,
 
3353
                  velocity_mesh_choice,
 
3354
                  diagnostic_scalar_field
 
3355
               }|
 
3356
               element aliased {
 
3357
                  generic_aliased_field
 
3358
               }
 
3359
            )
 
3360
         }|
 
3361
         element scalar_field {
 
3362
            attribute rank { "0" },
 
3363
            attribute name { "HarmonicPhaseK1" },
 
3364
            (
 
3365
               element diagnostic {
 
3366
                  internal_algorithm,
 
3367
                  velocity_mesh_choice,
 
3368
                  diagnostic_scalar_field
 
3369
               }|
 
3370
               element aliased {
 
3371
                  generic_aliased_field
 
3372
               }
 
3373
            )
 
3374
         }|
 
3375
         element scalar_field {
 
3376
            attribute rank { "0" },
 
3377
            attribute name { "HarmonicAmplitudeO1" },
 
3378
            (
 
3379
               element diagnostic {
 
3380
                  internal_algorithm,
 
3381
                  velocity_mesh_choice,
 
3382
                  diagnostic_scalar_field
 
3383
               }|
 
3384
               element aliased {
 
3385
                  generic_aliased_field
 
3386
               }
 
3387
            )
 
3388
         }|
 
3389
         element scalar_field {
 
3390
            attribute rank { "0" },
 
3391
            attribute name { "HarmonicPhaseO1" },
 
3392
            (
 
3393
               element diagnostic {
 
3394
                  internal_algorithm,
 
3395
                  velocity_mesh_choice,
 
3396
                  diagnostic_scalar_field
 
3397
               }|
 
3398
               element aliased {
 
3399
                  generic_aliased_field
 
3400
               }
 
3401
            )
 
3402
         }|
 
3403
         element scalar_field {
 
3404
            attribute rank { "0" },
 
3405
            attribute name { "HarmonicAmplitudeP1" },
 
3406
            (
 
3407
               element diagnostic {
 
3408
                  internal_algorithm,
 
3409
                  velocity_mesh_choice,
 
3410
                  diagnostic_scalar_field
 
3411
               }|
 
3412
               element aliased {
 
3413
                  generic_aliased_field
 
3414
               }
 
3415
            )
 
3416
         }|
 
3417
         element scalar_field {
 
3418
            attribute rank { "0" },
 
3419
            attribute name { "HarmonicPhaseP1" },
 
3420
            (
 
3421
               element diagnostic {
 
3422
                  internal_algorithm,
 
3423
                  velocity_mesh_choice,
 
3424
                  diagnostic_scalar_field
 
3425
               }|
 
3426
               element aliased {
 
3427
                  generic_aliased_field
 
3428
               }
 
3429
            )
 
3430
         }|
 
3431
         element scalar_field {
 
3432
            attribute rank { "0" },
 
3433
            attribute name { "HarmonicAmplitudeQ1" },
 
3434
            (
 
3435
               element diagnostic {
 
3436
                  internal_algorithm,
 
3437
                  velocity_mesh_choice,
 
3438
                  diagnostic_scalar_field
 
3439
               }|
 
3440
               element aliased {
 
3441
                  generic_aliased_field
 
3442
               }
 
3443
            )
 
3444
         }|
 
3445
         element scalar_field {
 
3446
            attribute rank { "0" },
 
3447
            attribute name { "HarmonicPhaseQ1" },
 
3448
            (
 
3449
               element diagnostic {
 
3450
                  internal_algorithm,
 
3451
                  velocity_mesh_choice,
 
3452
                  diagnostic_scalar_field
 
3453
               }|
 
3454
               element aliased {
 
3455
                  generic_aliased_field
 
3456
               }
 
3457
            )
 
3458
         }|
 
3459
         element scalar_field {
 
3460
            attribute rank { "0" },
 
3461
            attribute name { "HarmonicAmplitudeMf" },
 
3462
            (
 
3463
               element diagnostic {
 
3464
                  internal_algorithm,
 
3465
                  velocity_mesh_choice,
 
3466
                  diagnostic_scalar_field
 
3467
               }|
 
3468
               element aliased {
 
3469
                  generic_aliased_field
 
3470
               }
 
3471
            )
 
3472
         }|
 
3473
         element scalar_field {
 
3474
            attribute rank { "0" },
 
3475
            attribute name { "HarmonicPhaseMf" },
 
3476
            (
 
3477
               element diagnostic {
 
3478
                  internal_algorithm,
 
3479
                  velocity_mesh_choice,
 
3480
                  diagnostic_scalar_field
 
3481
               }|
 
3482
               element aliased {
 
3483
                  generic_aliased_field
 
3484
               }
 
3485
            )
 
3486
         }|
 
3487
         element scalar_field {
 
3488
            attribute rank { "0" },
 
3489
            attribute name { "HarmonicAmplitudeMm" },
 
3490
            (
 
3491
               element diagnostic {
 
3492
                  internal_algorithm,
 
3493
                  velocity_mesh_choice,
 
3494
                  diagnostic_scalar_field
 
3495
               }|
 
3496
               element aliased {
 
3497
                  generic_aliased_field
 
3498
               }
 
3499
            )
 
3500
         }|
 
3501
         element scalar_field {
 
3502
            attribute rank { "0" },
 
3503
            attribute name { "HarmonicPhaseMm" },
 
3504
            (
 
3505
               element diagnostic {
 
3506
                  internal_algorithm,
 
3507
                  velocity_mesh_choice,
 
3508
                  diagnostic_scalar_field
 
3509
               }|
 
3510
               element aliased {
 
3511
                  generic_aliased_field
 
3512
               }
 
3513
            )
 
3514
         }|
 
3515
         element scalar_field {
 
3516
            attribute rank { "0" },
 
3517
            attribute name { "HarmonicAmplitudeSSa" },
 
3518
            (
 
3519
               element diagnostic {
 
3520
                  internal_algorithm,
 
3521
                  velocity_mesh_choice,
 
3522
                  diagnostic_scalar_field
 
3523
               }|
 
3524
               element aliased {
 
3525
                  generic_aliased_field
 
3526
               }
 
3527
            )
 
3528
         }|
 
3529
         ## Output the universal numbering of the mesh on which this field is based.
 
3530
         element scalar_field {
 
3531
            attribute rank { "0" },
 
3532
            attribute name { "UniversalNumber" },
 
3533
            (
 
3534
               element diagnostic {
 
3535
                  internal_algorithm,
 
3536
                  mesh_choice,
 
3537
                  diagnostic_scalar_field
 
3538
               }|
 
3539
               element aliased {
 
3540
                  generic_aliased_field
 
3541
               }
 
3542
            )
 
3543
         }|
 
3544
         ## Output the processors which own the nodes of the mesh on which this field is based.
 
3545
         element scalar_field {
 
3546
            attribute rank { "0" },
 
3547
            attribute name { "NodeOwner" },
 
3548
            (
 
3549
               element diagnostic {
 
3550
                  internal_algorithm,
 
3551
                  mesh_choice,
 
3552
                  diagnostic_scalar_field
 
3553
               }|
 
3554
               element aliased {
 
3555
                  generic_aliased_field
 
3556
               }
 
3557
            )
 
3558
         }|
 
3559
         ## Output the processors which own the elements of the mesh on which this field is based.
 
3560
         element scalar_field {
 
3561
            attribute rank { "0" },
 
3562
            attribute name { "ElementOwner" },
 
3563
            (
 
3564
               element diagnostic {
 
3565
                  internal_algorithm,
 
3566
                  mesh_choice,
 
3567
                  diagnostic_scalar_field
 
3568
               }|
 
3569
               element aliased {
 
3570
                  generic_aliased_field
 
3571
               }
 
3572
            )
 
3573
         }|
 
3574
         ## Primary production of Phytoplankton. This is calculated by
 
3575
         ## the ocean biology module and will not be calculated unless
 
3576
         ## ocean biology is being simulated.
 
3577
         element scalar_field {
 
3578
            attribute rank { "0" },
 
3579
            attribute name { "HarmonicPhaseSSa" },
 
3580
            (
 
3581
               element diagnostic {
 
3582
                  internal_algorithm,
 
3583
                  velocity_mesh_choice,
 
3584
                  diagnostic_scalar_field
 
3585
               }|
 
3586
               element aliased {
 
3587
                  generic_aliased_field
 
3588
               }
 
3589
            )
 
3590
         }
 
3591
                  
 
3592
# Insert new diagnostic scalar fields here using the template:
 
3593
#        element scalar_field {
 
3594
#            attribute rank { "0" },
 
3595
#            attribute name { "NewFieldName" },
 
3596
#            (
 
3597
#               element diagnostic {
 
3598
#                  internal_algorithm,
 
3599
#                  velocity_mesh_choice,
 
3600
#                  diagnostic_scalar_field
 
3601
#               }|
 
3602
#               element aliased {
 
3603
#                  generic_aliased_field
 
3604
#               }
 
3605
#            )
 
3606
#        }
 
3607
      )
 
3608
   )
 
3609
 
 
3610
# This is the choice of additional vector field to be solved for
 
3611
vector_field_choice =
 
3612
   (
 
3613
# The first is a generic field, which may be used for any user-defined field
 
3614
# that FLUIDITY knows nothing about, or a generic diagnostic
 
3615
# Prognostic vector fields are not possible (other than velocity and those known fields below).
 
3616
      (
 
3617
         ## Generic field variable (vector)
 
3618
         element vector_field {
 
3619
            attribute rank { "1" },
 
3620
            attribute name { xsd:string },
 
3621
            ## Field type
 
3622
            (
 
3623
               element prescribed {
 
3624
                  mesh_choice,
 
3625
                  prescribed_vector_field
 
3626
               }|
 
3627
               element aliased {
 
3628
                  generic_aliased_field
 
3629
               }|
 
3630
               element diagnostic {
 
3631
                  vector_diagnostic_algorithms,
 
3632
                  velocity_mesh_choice,
 
3633
                  diagnostic_vector_field
 
3634
               }
 
3635
            )
 
3636
         }|
 
3637
#
 
3638
# -- List of fields that are primarily prognostic,
 
3639
#    but can be aliased.
 
3640
# -- The list is in order of most frequently used.
 
3641
#
 
3642
         ## Prescribed vector fields below this
 
3643
         element ___Prognostic_fields_below___ {
 
3644
            empty
 
3645
         }|
 
3646
 
 
3647
#
 
3648
# -- List of fields that are primarily prescribed,
 
3649
#    but can be aliased. An example is Maximum bed shear stress.
 
3650
# -- The list is in order of most frequently used.
 
3651
#
 
3652
         ## Prescribed vector fields below this
 
3653
         element ___Prescribed_fields_below___ {
 
3654
            empty
 
3655
         }|
 
3656
#
 
3657
# Insert new prescribed vector fields here using the template:
 
3658
#        element vector_field {
 
3659
#            attribute rank { "1" },
 
3660
#            attribute name { "NewFieldName" },
 
3661
#            (
 
3662
#               element prescribed {
 
3663
#                  mesh_choice,
 
3664
#                  prescribed_vector_field
 
3665
#               }|
 
3666
#               element aliased {
 
3667
#                  generic_aliased_field
 
3668
#               }
 
3669
#            )
 
3670
#        }
 
3671
#
 
3672
# -- Last is a list of fields that are primarily diagnostic,
 
3673
#    but can be aliased. An example is Tidal Range.
 
3674
# -- The list is in order of most frequently used.
 
3675
#
 
3676
         ## Diagnostic vector fields below this
 
3677
         element ___Diagnostic_Fields_Below___ {
 
3678
            empty
 
3679
         }|
 
3680
 
 
3681
         ## Gradient of a scalar field evaluated using the C gradient
 
3682
         ## matrix constructed using finite elements.
 
3683
         ## Field must be in this material_phase.
 
3684
         element vector_field {
 
3685
            attribute rank { "1" },
 
3686
            attribute name { "FiniteElementGradient" },
 
3687
            (
 
3688
               element diagnostic {
 
3689
                  internal_algorithm,
 
3690
                  attribute field_name { string },
 
3691
                  mesh_choice,
 
3692
                  element integrate_gradient_by_parts {
 
3693
                     empty
 
3694
                  }?,
 
3695
                  diagnostic_gradient_vector_field
 
3696
               }|
 
3697
               element aliased {
 
3698
                  generic_aliased_field
 
3699
               }
 
3700
            )
 
3701
         }|
 
3702
 
 
3703
         ## Gradient of a scalar field evaluated using the transpose
 
3704
         ## of the C^T divergence matrix constructed using finite
 
3705
         ## elements.
 
3706
         ## Field must be in this material_phase.
 
3707
         element vector_field {
 
3708
            attribute rank { "1" },
 
3709
            attribute name { "FiniteElementDivergenceTransposed" },
 
3710
            (
 
3711
               element diagnostic {
 
3712
                  internal_algorithm,
 
3713
                  attribute field_name { string },
 
3714
                  mesh_choice,
 
3715
                  element integrate_divergence_by_parts {
 
3716
                     empty
 
3717
                  }?,
 
3718
                  diagnostic_gradient_vector_field
 
3719
               }|
 
3720
               element aliased {
 
3721
                  generic_aliased_field
 
3722
               }
 
3723
            )
 
3724
         }|
 
3725
         
 
3726
         ## Relative vorticity field - curl of the velocity field
 
3727
         element vector_field {
 
3728
            attribute rank { "1" },
 
3729
            attribute name { "Vorticity" },
 
3730
            (
 
3731
               element diagnostic {
 
3732
                  internal_algorithm,
 
3733
                  ### Relative vorticity
 
3734
                  #element algorithm {
 
3735
                  #   attribute name { "curl" },
 
3736
                  #   attribute material_phase_support { "single" },
 
3737
                  #   attribute source_field_name { "Velocity" }
 
3738
                  #},
 
3739
                  element mesh {
 
3740
                     attribute name { "VelocityMesh" }
 
3741
                  },
 
3742
                  diagnostic_vector_field
 
3743
               }|
 
3744
               element aliased {
 
3745
                  generic_aliased_field
 
3746
               }
 
3747
            )
 
3748
         }|        
 
3749
         ## Planetary vorticity
 
3750
         ##
 
3751
         ## Limitations:
 
3752
         ##  - Requires geometry dimension of 3.
 
3753
         element vector_field {
 
3754
            attribute rank { "1" },
 
3755
            attribute name { "PlanetaryVorticity" },
 
3756
            (
 
3757
               element diagnostic {
 
3758
                  internal_algorithm,
 
3759
                  velocity_mesh_choice,
 
3760
                  diagnostic_vector_field
 
3761
               }|
 
3762
               element aliased {
 
3763
                  generic_aliased_field
 
3764
               }
 
3765
            )
 
3766
         }|
 
3767
         ## Absolute vorticity:
 
3768
         ##
 
3769
         ##   f + curl u
 
3770
         ##
 
3771
         ## Limitations:
 
3772
         ##  - Requires a geometry dimension of 3.
 
3773
         element vector_field {
 
3774
            attribute rank { "1" },
 
3775
            attribute name { "AbsoluteVorticity" },
 
3776
            attribute depends { "Velocity" },
 
3777
            (
 
3778
               element diagnostic {
 
3779
                  internal_algorithm,
 
3780
                  velocity_mesh_choice,
 
3781
                  diagnostic_vector_field
 
3782
               }|
 
3783
               element aliased {
 
3784
                  generic_aliased_field
 
3785
               }
 
3786
            )
 
3787
         }|
 
3788
         
 
3789
         ## Gradient of a scalar field evaluated using the transpose
 
3790
         ## of the C^T matrix constructed using control volumes.
 
3791
         ## Field must be in this material_phase.
 
3792
         element vector_field {
 
3793
            attribute rank { "1" },
 
3794
            attribute name { "ControlVolumeDivergenceTransposed" },
 
3795
            (
 
3796
               element diagnostic {
 
3797
                  internal_algorithm,
 
3798
                  attribute field_name { string },
 
3799
                  velocity_mesh_choice,
 
3800
                  diagnostic_cv_gradient_vector_field
 
3801
               }|
 
3802
               element aliased {
 
3803
                  generic_aliased_field
 
3804
               }
 
3805
            )
 
3806
         }|
 
3807
         ## Full velocity in an
 
3808
         ## inner element SGS treatment of momentum
 
3809
         ##
 
3810
         ## Limitations:
 
3811
         ##  - Requires a geometry dimension of 3.
 
3812
         ##  - Requires inner element active for momentum
 
3813
         element vector_field {
 
3814
            attribute rank { "1" },
 
3815
            attribute name { "InnerElementFullVelocity" },
 
3816
            (
 
3817
               element diagnostic {
 
3818
                  internal_algorithm,
 
3819
                  element mesh {
 
3820
                     attribute name {  "InnerElementMesh" }
 
3821
                  },
 
3822
                  diagnostic_vector_field
 
3823
               }|
 
3824
               element aliased {
 
3825
                  generic_aliased_field
 
3826
               }
 
3827
            )
 
3828
         }|
 
3829
         ## Vorticity of the full velocity in an
 
3830
         ## inner element SGS treatment of momentum
 
3831
         ##
 
3832
         ## Limitations:
 
3833
         ##  - Requires a geometry dimension of 3.
 
3834
         ##  - Requires inner element active for momentum
 
3835
         element vector_field {
 
3836
            attribute rank { "1" },
 
3837
            attribute name { "InnerElementFullVorticity" },
 
3838
            (
 
3839
               element diagnostic {
 
3840
                  internal_algorithm,
 
3841
                  element mesh {
 
3842
                     attribute name {  "InnerElementMesh" }
 
3843
                  },
 
3844
                  diagnostic_vector_field
 
3845
               }|
 
3846
               element aliased {
 
3847
                  generic_aliased_field
 
3848
               }
 
3849
            )
 
3850
         }|
 
3851
         ## Vorticity of the SGS velocity in an
 
3852
         ## inner element SGS treatment of momentum
 
3853
         ##
 
3854
         ## Limitations:
 
3855
         ##  - Requires a geometry dimension of 3.
 
3856
         ##  - Requires inner element active for momentum
 
3857
         element vector_field {
 
3858
            attribute rank { "1" },
 
3859
            attribute name { "InnerElementVorticity" },
 
3860
            (
 
3861
               element diagnostic {
 
3862
                  internal_algorithm,
 
3863
                  element mesh {
 
3864
                     attribute name {  "InnerElementMesh" }
 
3865
                  },
 
3866
                  diagnostic_vector_field
 
3867
               }|
 
3868
               element aliased {
 
3869
                  generic_aliased_field
 
3870
               }
 
3871
            )
 
3872
         }|
 
3873
         ## The continuous solution mapped to a discontinuous mesh
 
3874
         ##
 
3875
         ## Limitations:
 
3876
         ##  - Requires a geometry dimension of 3.
 
3877
         ##  - Requires inner element active for momentum
 
3878
         element vector_field {
 
3879
            attribute rank { "1" },
 
3880
            attribute name { "DgMappedVelocity" },
 
3881
            (
 
3882
               element diagnostic {
 
3883
                  internal_algorithm,
 
3884
                  element mesh {
 
3885
                     attribute name {  "InnerElementMesh" }
 
3886
                  },
 
3887
                  diagnostic_vector_field
 
3888
               }|
 
3889
               element aliased {
 
3890
                  generic_aliased_field
 
3891
               }
 
3892
            )
 
3893
         }|
 
3894
         ## Vorticity of the DG mapped Velocity
 
3895
         ## Note vorticity is actually calculated over a DG field
 
3896
         ##
 
3897
         ## Limitations:
 
3898
         ##  - Requires a geometry dimension of 3.
 
3899
         ##  - Requires inner element active for momentum
 
3900
         element vector_field {
 
3901
            attribute rank { "1" },
 
3902
            attribute name { "DgMappedVorticity" },
 
3903
            (
 
3904
               element diagnostic {
 
3905
                  internal_algorithm,
 
3906
                  element mesh {
 
3907
                     attribute name {  "InnerElementMesh" }
 
3908
                  },
 
3909
                  diagnostic_vector_field
 
3910
               }|
 
3911
               element aliased {
 
3912
                  generic_aliased_field
 
3913
               }
 
3914
            )
 
3915
         }|
 
3916
         ## Solid Velocity field.  Used to generate the momentum source 
 
3917
         element vector_field {
 
3918
            attribute rank { "1" },
 
3919
            attribute replaces {"UTRAF,VTRAF,WTRAF"},
 
3920
            attribute name { "SolidVelocity" },
 
3921
            (
 
3922
               element diagnostic {
 
3923
                  internal_algorithm,
 
3924
                  mesh_choice,
 
3925
                  diagnostic_vector_field
 
3926
               }
 
3927
            )
 
3928
         }|
 
3929
         ## Same as Solid Velocity field but it is on the Particle mesh.
 
3930
         ## It is used to map the velocities coming from an external program like
 
3931
         ## FEMDEM or DEM to the fluid mesh. 
 
3932
         element vector_field {
 
3933
            attribute rank { "1" },
 
3934
            attribute name { "ParticleVector" },
 
3935
            (
 
3936
               element diagnostic {
 
3937
                  internal_algorithm,
 
3938
                  mesh_choice,
 
3939
                  diagnostic_vector_field
 
3940
               }
 
3941
            )
 
3942
         }|
 
3943
         ## Same as Solid Velocity field but it is on the Particle mesh.
 
3944
         ## It is used to map the velocities coming from an external program like
 
3945
         ## FEMDEM or DEM to the fluid mesh. 
 
3946
         element vector_field {
 
3947
            attribute rank { "1" },
 
3948
            attribute name { "ParticleForce" },
 
3949
            (
 
3950
               element diagnostic {
 
3951
                  internal_algorithm,
 
3952
                  mesh_choice,
 
3953
                  diagnostic_vector_field
 
3954
               }
 
3955
            )
 
3956
         }|
 
3957
 
 
3958
         ## Same as Solid Velocity field but it is on the Particle mesh.
 
3959
         ## It is used to map the velocities coming from an external program like
 
3960
         ## FEMDEM or DEM to the fluid mesh. 
 
3961
         element vector_field {
 
3962
            attribute rank { "1" },
 
3963
            attribute name { "SolidForce" },
 
3964
            (
 
3965
               element diagnostic {
 
3966
                  internal_algorithm,
 
3967
                  velocity_mesh_choice,
 
3968
                  diagnostic_vector_field
 
3969
               }
 
3970
            )
 
3971
         }|
 
3972
         element vector_field {
 
3973
            attribute rank { "1" },
 
3974
            attribute name { "VelocityPlotForSolids" },
 
3975
            (
 
3976
               element diagnostic {
 
3977
                  internal_algorithm,
 
3978
                  velocity_mesh_choice,
 
3979
                  diagnostic_vector_field
 
3980
               }
 
3981
            )
 
3982
         }|
 
3983
         ## Same as Solid Velocity field but it is on the Particle mesh.
 
3984
         ## It is used to map the velocities coming from an external program like
 
3985
         ## FEMDEM or DEM to the fluid mesh. 
 
3986
         element vector_field {
 
3987
            attribute rank { "1" },
 
3988
            attribute name { "FunctionalGradient" },
 
3989
            (
 
3990
               element diagnostic {
 
3991
                  internal_algorithm,
 
3992
                  velocity_mesh_choice,
 
3993
                  diagnostic_vector_field
 
3994
               }
 
3995
            )
 
3996
         }|
 
3997
         ## LinearMomentum field.
 
3998
         ##  p = \rho*u 
 
3999
         ## (where p is the linear momentum, \rho the density and u the velocity)
 
4000
         element vector_field {
 
4001
             attribute rank { "1" },
 
4002
             attribute name { "LinearMomentum" },
 
4003
             (
 
4004
                element diagnostic {
 
4005
                   internal_algorithm,
 
4006
                   velocity_mesh_choice,
 
4007
                   diagnostic_vector_field
 
4008
                }|
 
4009
                element aliased {
 
4010
                   generic_aliased_field
 
4011
                }
 
4012
             )
 
4013
         }|
 
4014
         ## Calculate the control volume auxiliary gradient for a particular field.
 
4015
         ## The related field must be a scalar field in this material_phase.
 
4016
         element vector_field {
 
4017
            attribute rank { "0" },
 
4018
            attribute name { "ControlVolumeAuxiliaryGradient" },
 
4019
            (
 
4020
               element diagnostic {
 
4021
                  internal_algorithm,
 
4022
                  velocity_mesh_choice,
 
4023
                  attribute gradient_of_field { string },
 
4024
                  diagnostic_vector_field
 
4025
               }|
 
4026
               element aliased {
 
4027
                  generic_aliased_field
 
4028
               }
 
4029
            )
 
4030
         }|
 
4031
         ## Calculate the dg (Bassi Rebay) auxiliary gradient for a particular field.
 
4032
         ## The related field must be a scalar field in this material_phase.
 
4033
         element vector_field {
 
4034
            attribute rank { "0" },
 
4035
            attribute name { "DGAuxiliaryGradient" },
 
4036
            (
 
4037
               element diagnostic {
 
4038
                  internal_algorithm,
 
4039
                  velocity_mesh_choice,
 
4040
                  attribute gradient_of_field { string },
 
4041
                  diagnostic_vector_field
 
4042
               }|
 
4043
               element aliased {
 
4044
                  generic_aliased_field
 
4045
               }
 
4046
            )
 
4047
         }|
 
4048
         ## Experimental geostrophic source field to be used in combination with
 
4049
         ## a free surface. Does not solve a vertical balance yet.
 
4050
         element vector_field {
 
4051
            attribute rank { "1" },
 
4052
            attribute name { "GeostrophicSource" },
 
4053
            (
 
4054
               element diagnostic {
 
4055
                  internal_algorithm,
 
4056
                  mesh_choice,
 
4057
                  diagnostic_vector_field
 
4058
               }
 
4059
            )
 
4060
         }|
 
4061
 
 
4062
         ## Absolute Difference between two vector fields.
 
4063
         ##
 
4064
         ## Both fields must be in this material_phase.
 
4065
         ## Assumes both fields are on the same mesh as the AbsoluteDifference field.
 
4066
         element vector_field {
 
4067
            attribute rank { "1" },
 
4068
            attribute name { "AbsoluteDifference" },
 
4069
            (
 
4070
               element diagnostic {
 
4071
                  internal_algorithm,
 
4072
                  attribute field_name_a { string },
 
4073
                  attribute field_name_b { string },
 
4074
                  mesh_choice,
 
4075
                  diagnostic_vector_field
 
4076
               }|
 
4077
               element aliased {
 
4078
                  generic_aliased_field
 
4079
               }
 
4080
            )
 
4081
         }|
 
4082
 
 
4083
         ## Absolute Difference between two vector fields.
 
4084
         ##
 
4085
         ## Both fields must be in this material_phase.
 
4086
         ## Assumes both fields are on the same mesh as the AbsoluteDifference field.
 
4087
         element vector_field {
 
4088
            attribute rank { "1" },
 
4089
            attribute name { "VectorAbsoluteDifference" },
 
4090
            (
 
4091
               element diagnostic {
 
4092
                  internal_algorithm,
 
4093
                  attribute field_name_a { string },
 
4094
                  attribute field_name_b { string },
 
4095
                  mesh_choice,
 
4096
                  diagnostic_vector_field
 
4097
               }|
 
4098
               element aliased {
 
4099
                  generic_aliased_field
 
4100
               }
 
4101
            )
 
4102
         }|
 
4103
         
 
4104
         ## Bed Shear Stress = density*drag_coeff*|u|*u
 
4105
         ##
 
4106
         ## at the moment this assumes the density and drag coefficients are constants.
 
4107
         ## This diagnostic vector field is only calculated over surface elements/nodes, 
 
4108
         ## interior nodes will have zero value.
 
4109
         element vector_field {
 
4110
             attribute rank { "1" },
 
4111
             attribute name { "BedShearStress" },
 
4112
             (
 
4113
                element diagnostic {
 
4114
                   internal_algorithm,
 
4115
                   velocity_mesh_choice,
 
4116
                   diagnostic_vector_field_bed_shear_stress
 
4117
                }|
 
4118
                element aliased {
 
4119
                   generic_aliased_field
 
4120
                }
 
4121
             )
 
4122
         }|
 
4123
         ## Max Bed Shear Stress.
 
4124
         ##
 
4125
         ## Note that you need BedShearStress turned on for this to work.
 
4126
         element vector_field {
 
4127
             attribute rank { "1" },
 
4128
             attribute name { "MaxBedShearStress" },
 
4129
             (
 
4130
                element diagnostic {
 
4131
                   internal_algorithm,
 
4132
                   velocity_mesh_choice
 
4133
                   #diagnostic_vector_field_max_bed_shear_stress
 
4134
                }|
 
4135
                element aliased {
 
4136
                   generic_aliased_field
 
4137
                }
 
4138
             ),
 
4139
            ## This is the time after which the max operator is
 
4140
            ## applied to the bed shear stress.
 
4141
            element spin_up_time {
 
4142
               real
 
4143
            }
 
4144
         }|
 
4145
 
 
4146
         ## Displacement
 
4147
         element vector_field {
 
4148
             attribute rank { "1" },
 
4149
             attribute name { "Displacement" },
 
4150
             (
 
4151
                element diagnostic {
 
4152
                   internal_algorithm,
 
4153
                   velocity_mesh_choice,
 
4154
                   diagnostic_vector_field
 
4155
                }|
 
4156
                element aliased {
 
4157
                   generic_aliased_field
 
4158
                }
 
4159
             )
 
4160
         }|
 
4161
         ## Galerkin projection of one field onto another mesh.
 
4162
         ##
 
4163
         ## The field must be in this material_phase.
 
4164
         ## 
 
4165
         ## NOTE: you need the solver options if the mesh
 
4166
         ## of this field is continuous.
 
4167
         element vector_field {
 
4168
            attribute rank { "1" },
 
4169
            attribute name { "GalerkinProjection" },
 
4170
            (
 
4171
               element diagnostic {
 
4172
                  internal_algorithm,
 
4173
                  element source_field_name { string },
 
4174
                  mesh_choice,
 
4175
                  ## Lump the mass matrix of the galerkin projection
 
4176
                  ## less accurate but faster and might give smoother result.                  
 
4177
                  element lump_mass {
 
4178
                     empty
 
4179
                  }?,                  
 
4180
                  element solver {
 
4181
                  linear_solver_options_sym
 
4182
                  }?,
 
4183
                  diagnostic_vector_field
 
4184
               }|
 
4185
               element aliased {
 
4186
                  generic_aliased_field
 
4187
               }
 
4188
            )
 
4189
         }|
 
4190
         ## Projects the Coriolis term onto the mesh of this diagnostic field.
 
4191
         ## Note that multiple projection methods are available (under the
 
4192
         ## algorithm option).
 
4193
         element vector_field {
 
4194
            attribute rank { "1" },
 
4195
            attribute name { "Coriolis" },
 
4196
            (
 
4197
               element diagnostic {
 
4198
                  coriolis_algorithm,
 
4199
                  velocity_mesh_choice,
 
4200
                  diagnostic_vector_field
 
4201
               }
 
4202
            )
 
4203
         }
 
4204
 
 
4205
# Insert new diagnostic vector field here using the template:
 
4206
#        element vector_field {
 
4207
#            attribute rank { "1" },
 
4208
#            attribute name { "NewFieldName" },
 
4209
#            (
 
4210
#               element diagnostic {
 
4211
#                  internal_algorithm,
 
4212
#                  mesh_choice,
 
4213
#                  diagnostic_vector_field
 
4214
#               }|
 
4215
#               element aliased {
 
4216
#                  generic_aliased_field
 
4217
#               }
 
4218
#            )
 
4219
#        }
 
4220
      )
 
4221
   )  
 
4222
 
 
4223
# This is the choice of additional tensor fields
 
4224
tensor_field_choice =
 
4225
   (
 
4226
# The first is a generic field, which may be used for any user-defined field
 
4227
# that FLUIDITY knows nothing about, or a generic diagnostic
 
4228
# Prognostic tensor fields are not possible.
 
4229
      (
 
4230
         ## Generic field variable (tensor)
 
4231
         element tensor_field {
 
4232
            attribute rank { "2" },
 
4233
            attribute name { xsd:string },
 
4234
            ## Field type
 
4235
            (
 
4236
               element prescribed {
 
4237
                  mesh_choice,
 
4238
                  prescribed_tensor_field
 
4239
               }|
 
4240
               element aliased {
 
4241
                  generic_aliased_field
 
4242
               }|
 
4243
               element diagnostic {
 
4244
                  tensor_diagnostic_algorithms,
 
4245
                  velocity_mesh_choice,
 
4246
                  python_diagnostic_field_code?,
 
4247
                  diagnostic_tensor_field
 
4248
               }
 
4249
            )
 
4250
         }|
 
4251
#
 
4252
# -- Second is a list of tensor fields that are primarily prescribed,
 
4253
#    but can be aliased.
 
4254
# -- The list is in order of most frequently used.
 
4255
#
 
4256
         ## Prescribed scalar fields below this
 
4257
         element ___Prescribed_fields_below___ {
 
4258
            empty
 
4259
         }|
 
4260
 
 
4261
         ## MaterialViscosity field:
 
4262
         ##
 
4263
         ## Field for the viscosity of this material.
 
4264
         ## Required if using a diagnostic bulk viscosity
 
4265
         ## in a multimaterial simulation.
 
4266
         element tensor_field {
 
4267
            attribute rank { "2" },
 
4268
            attribute name { "MaterialViscosity" },
 
4269
            (
 
4270
               element prescribed {
 
4271
                  mesh_choice,
 
4272
                  prescribed_tensor_field
 
4273
               }|
 
4274
               element aliased {
 
4275
                  generic_aliased_field
 
4276
               }
 
4277
            )
 
4278
         }|
 
4279
 
 
4280
         element tensor_field {
 
4281
            attribute rank { "2" },
 
4282
            attribute name { "MaterialElasticity" },
 
4283
            (
 
4284
               element prescribed {
 
4285
                  mesh_choice,
 
4286
                  prescribed_tensor_field
 
4287
               }|
 
4288
               element aliased {
 
4289
                  generic_aliased_field
 
4290
               }
 
4291
            )
 
4292
         }|
 
4293
 
 
4294
#
 
4295
# Insert new prescribed tensor fields here using the template:
 
4296
#        element tensor_field {
 
4297
#            attribute rank { "2" },
 
4298
#            attribute name { "NewFieldName" },
 
4299
#            (
 
4300
#               element prescribed {
 
4301
#                  mesh_choice,
 
4302
#                  prescribed_tensor_field
 
4303
#               }|
 
4304
#               element aliased {
 
4305
#                  generic_aliased_field
 
4306
#               }
 
4307
#            )
 
4308
#        }|
 
4309
#
 
4310
# -- Last is a list of fields that are primarily diagnostic,
 
4311
#    but can be aliased.
 
4312
# -- The list is in order of most frequently used.
 
4313
#
 
4314
         ## Diagnostic tensor fields below this
 
4315
         element ___Diagnostic_Fields_Below___ {
 
4316
            empty
 
4317
         }|
 
4318
         ## From a field on a mesh, diagnose the anisotropic
 
4319
         ## interpolation weight that would give the mesh back.
 
4320
         ## It is computed as:
 
4321
         ## \Eps = M^-1 |H|
 
4322
         element tensor_field {
 
4323
            attribute rank { "2" },
 
4324
            attribute name { "FieldTolerance" },
 
4325
            (
 
4326
               element diagnostic {
 
4327
                  internal_algorithm,
 
4328
                  element source_field_name { string },
 
4329
                  velocity_mesh_choice,
 
4330
                  diagnostic_tensor_field
 
4331
               }|
 
4332
               element aliased {
 
4333
                  generic_aliased_field
 
4334
               }
 
4335
            )
 
4336
         }
 
4337
 
 
4338
# Insert new diagnostic tensor field here using the template:
 
4339
#        element tensor_field {
 
4340
#            attribute name { "NewFieldName" },
 
4341
#            (
 
4342
#               element diagnostic {
 
4343
#                  internal_algorithm,
 
4344
#                  mesh_choice,
 
4345
#                  diagnostic_tensor_field
 
4346
#               }|
 
4347
#               element aliased {
 
4348
#                  generic_aliased_field
 
4349
#               }
 
4350
#            )
 
4351
#        }
 
4352
      )
 
4353
   )
 
4354
 
 
4355
mesh_info =
 
4356
   (
 
4357
      ## Read mesh from file.
 
4358
      element from_file {
 
4359
         (
 
4360
            ## Triangle mesh format.
 
4361
            ##
 
4362
            ## Enter the base name without the .edge .ele, .face or
 
4363
            ## .node extensions, and without process numbers.
 
4364
            element format {
 
4365
              attribute name { "triangle" },
 
4366
              comment
 
4367
            }|
 
4368
            ## Read the mesh from a vtu. Note that the mesh will have no surface
 
4369
            ## or region IDs.
 
4370
            element format {
 
4371
              attribute name { "vtu" },
 
4372
              comment
 
4373
            }|
 
4374
            ## CGNS mesh format (not yet implemented)
 
4375
            element format {
 
4376
               attribute name { "cgns" },
 
4377
               comment
 
4378
            }
 
4379
         ),
 
4380
         attribute file_name { xsd:string },
 
4381
         from_file_mesh_stat_options,
 
4382
         comment
 
4383
      }|
 
4384
      ## Make mesh from existing mesh. The existing mesh cannot itself
 
4385
      ## be made from an existing mesh (i.e. it must be read from a
 
4386
      ## file).
 
4387
      element from_mesh {
 
4388
         mesh_choice,
 
4389
         element mesh_shape {
 
4390
            element polynomial_degree {
 
4391
               integer
 
4392
            }
 
4393
         }?,
 
4394
         element mesh_continuity {
 
4395
            element string_value{
 
4396
               "continuous" | "discontinuous"
 
4397
            }
 
4398
         }?,
 
4399
         ## Make mesh periodic
 
4400
         element periodic_boundary_conditions {
 
4401
            attribute name { xsd:string },
 
4402
            ## List of boundary ids that are aliased to
 
4403
            element physical_boundary_ids {
 
4404
               integer_vector
 
4405
            },
 
4406
            ## List of boundary ids that are aliased
 
4407
            element  aliased_boundary_ids {
 
4408
               integer_vector
 
4409
            },
 
4410
            ## Python code which takes coordinate of an aliased
 
4411
            ## boundary node and returns the coordinate of a physical
 
4412
            ## boundary node
 
4413
            element coordinate_map {
 
4414
               python_code
 
4415
            }
 
4416
         }*,
 
4417
         ## Extrude a horizontal (1D or 2D) mesh in the vertical
 
4418
         element extrude {
 
4419
            ## Depth over which to extrude
 
4420
            ## top will be at z=0
 
4421
            ## bottom will be at z=-bottom_depth
 
4422
            element bottom_depth {
 
4423
               real
 
4424
            },
 
4425
            ## Constant or function to specify the depth of the
 
4426
            ## layers. The function is a function of all coordinates
 
4427
            ## (so in 2+1D: x,y and z) to specify a layer depth that
 
4428
            ## varies both in the horizontal as in the vertical.
 
4429
            element sizing_function {
 
4430
               input_choice_real
 
4431
            },
 
4432
            ## surface_id to assign to the top of the extruded mesh
 
4433
            element top_surface_id {
 
4434
               integer
 
4435
            }?,
 
4436
            ## surface_id to assign to the bottom of the extruded mesh
 
4437
            element bottom_surface_id {
 
4438
               integer
 
4439
            }?
 
4440
         }?,
 
4441
         derived_mesh_stat_options,
 
4442
         comment
 
4443
      }
 
4444
   )
 
4445
 
 
4446
# Options for inclusion/exclusion of mesh statistics from the .stat file
 
4447
include_mesh_in_stat =
 
4448
   (
 
4449
      ## Include this mesh in the .stat file
 
4450
      element include_in_stat {
 
4451
         comment
 
4452
      }
 
4453
   )
 
4454
exclude_mesh_from_stat =
 
4455
   (
 
4456
      ## Exclude this mesh from the .stat file
 
4457
      element exclude_from_stat {
 
4458
         comment
 
4459
      }
 
4460
   )
 
4461
 
 
4462
# Diagnostic statistics options for meshed, with enabled by default
 
4463
mesh_stat_options_enabled_default = include_mesh_in_stat
 
4464
mesh_stat_options_enabled_default |= exclude_mesh_from_stat
 
4465
 
 
4466
# Diagnostic statistics options for meshed, with disabled by default
 
4467
mesh_stat_options_disabled_default = exclude_mesh_from_stat
 
4468
mesh_stat_options_disabled_default |= include_mesh_in_stat
 
4469
 
 
4470
from_file_mesh_stat_options =
 
4471
   (
 
4472
      ## Specify what is added to .stat files
 
4473
      element stat {
 
4474
         mesh_stat_options_enabled_default
 
4475
      }
 
4476
   )
 
4477
derived_mesh_stat_options =
 
4478
   (
 
4479
      ## Specify what is added to .stat files
 
4480
      element stat {
 
4481
         mesh_stat_options_disabled_default
 
4482
      }
 
4483
   )
 
4484
 
 
4485
input_choice_tensor_field =
 
4486
   (
 
4487
      (
 
4488
         ## An isotropic tensor, i.e.
 
4489
         ## one with no directional variation.
 
4490
         ## Can be represented as a scalar real.
 
4491
         element isotropic {
 
4492
            input_choice_real
 
4493
         }|
 
4494
         ## A symmetric tensor, i.e.
 
4495
         ## A^T = A
 
4496
         element anisotropic_symmetric {
 
4497
            input_choice_real_dim_symmetric_tensor
 
4498
         }|
 
4499
         ## A general asymmetric tensor.
 
4500
         element anisotropic_asymmetric {
 
4501
            input_choice_real_dim_tensor
 
4502
         }
 
4503
      )
 
4504
   )
 
4505
 
 
4506
constitutive_laws =
 
4507
   (
 
4508
      (
 
4509
         ## Constitutive laws for fluids
 
4510
         element constitutive_law {
 
4511
            attribute name { "fluid" }
 
4512
         }|
 
4513
         ## Constitutive laws for solids
 
4514
         element constitutive_law {
 
4515
            attribute name { "solid" }
 
4516
         }
 
4517
      )
 
4518
   )
 
4519
   
 
4520
region_ids = 
 
4521
   ( 
 
4522
      ## Optional region ids to associate different values
 
4523
      ## to different regions of the mesh.
 
4524
      ## Leave unselected if you`re not using multiple regions or
 
4525
      ## region_ids.
 
4526
      ## Currently only works with triangle files created by gmsh2triangle.
 
4527
      element region_ids {
 
4528
         integer_vector
 
4529
      }?
 
4530
   )
 
4531
 
 
4532
temporal_control_volume_options =
 
4533
   (
 
4534
      ## Temporal discretisation options that are only relevant if a control volume or mixed control volume - continuous galerkin spatial discretisation is selected for this field.
 
4535
      element control_volumes {
 
4536
         ## Number of iterations within an advection solve.
 
4537
         ## This increases the accuracy of the face values and ensures that
 
4538
         ## the pivoted solution is cancelled out.
 
4539
         ## Defaults to 1 if unselected.
 
4540
         element number_advection_iterations {
 
4541
            attribute replaces { "INT(ABS(NDISOT)/10)" },
 
4542
            integer,
 
4543
            ## Cut short advection_iterations if the specified tolerance
 
4544
            ## is reached.
 
4545
            ## This only works for pure control volume discretisations.
 
4546
            element tolerance {
 
4547
               real,
 
4548
               (
 
4549
                  ## Select the norm with which you want the tolerance to be tested.
 
4550
                  ##
 
4551
                  ## The infinity norm.
 
4552
                  element infinity_norm {
 
4553
                    empty
 
4554
                  }|
 
4555
                  ## Select the norm with which you want the tolerance to be tested.
 
4556
                  ##
 
4557
                  ## The l2 norm.
 
4558
                  element l2_norm {
 
4559
                    empty
 
4560
                  }|
 
4561
                  ## Select the norm with which you want the tolerance to be tested.
 
4562
                  ##
 
4563
                  ## The l2 norm evaluated on a control volume mesh.
 
4564
                  element cv_l2_norm {
 
4565
                    empty
 
4566
                  }
 
4567
               )               
 
4568
            }?
 
4569
         }?,
 
4570
         (
 
4571
            ## Use timestep subcycling to solve this equation.
 
4572
            ## Specify the maximum courant number per subcycle.
 
4573
            ## This only works for pure control volume discretisations.
 
4574
            element maximum_courant_number_per_subcycle {
 
4575
               real,
 
4576
               field_based_cfl_number_options
 
4577
            }|
 
4578
            ## Use timestep subcycling to solve this equation.
 
4579
            ## Specify the number of subcycles.
 
4580
            ## This only works for pure control volume discretisations.
 
4581
            element number_advection_subcycles {
 
4582
               integer
 
4583
            }
 
4584
         )?,
 
4585
         ## Only works if a control volume or mixed control volume -
 
4586
         ## continuous galerkin spatial discretisation is selected.
 
4587
         ## If not active then the theta specified above will be used.
 
4588
         ## Otherwise use variable limited theta on individual faces.
 
4589
         element limit_theta {
 
4590
            attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 1,3,5,7,9 (odd)" },
 
4591
            empty
 
4592
         }?,
 
4593
         ## Only works if a control volume or mixed control volume -
 
4594
         ## continuous galerkin spatial discretisation is selected.
 
4595
         ## Time discretisation of upwind discretisation off which the
 
4596
         ## higher order solution is pivotted.
 
4597
         ##  - pivot_theta = 1 - implicit pivot (default if not set and 
 
4598
         ##                      best choice if not intentionally modifying
 
4599
         ##                      scheme to be explicit)
 
4600
         ##  - pivot_theta = 0 - explicit pivot
 
4601
         element pivot_theta {
 
4602
            real
 
4603
         }?
 
4604
      }
 
4605
   )
 
4606
 
 
4607
temporal_discontinuous_galerkin_options = 
 
4608
   (
 
4609
      ## This enables DG-specific timestepping options, such as
 
4610
      ## explicit advection subcycling. 
 
4611
      element discontinuous_galerkin {
 
4612
         (
 
4613
            ## Use timestep subcycling to solve this equation.
 
4614
            ## Specify the maximum courant number per subcycle.
 
4615
            element maximum_courant_number_per_subcycle {
 
4616
               real
 
4617
            }|
 
4618
            ## Use timestep subcycling to solve this equation.
 
4619
            ## Specify the number of subcycles.
 
4620
            element number_advection_subcycles {
 
4621
               integer
 
4622
            }
 
4623
         )?
 
4624
      }
 
4625
   )
 
4626
 
 
4627
pure_cv_options = 
 
4628
   (
 
4629
      ## Use a pure control volume discretisations.
 
4630
      ## Follows a new control volume code path.
 
4631
      element control_volumes {
 
4632
         spatial_control_volume_options,
 
4633
         (
 
4634
            ## Use the gradient of the field constructed using the
 
4635
            ## basis functions of the parent finite element mesh to
 
4636
            ## form the divergence.
 
4637
            ##
 
4638
            ## DOES NOT CURRENTLY WORK WITH ROBIN OR WEAK DIRICHLET BOUNDARY CONDITIONS!
 
4639
            ##
 
4640
            ## Based on schemes in Handbook of Numerical Analysis,
 
4641
            ## P.G. Ciarlet, J.L. Lions eds, vol 7, pp 713-1020
 
4642
            element diffusion_scheme {
 
4643
              attribute name{"ElementGradient"}
 
4644
            }|
 
4645
            ## Use an auxiliary gradient equation to find the gradient of the field.
 
4646
            ##
 
4647
            ## DOES NOT CURRENTLY WORK WITH ROBIN BOUNDARY CONDITIONS!
 
4648
            ##
 
4649
            ## Based on scheme proposed in Bassi, F. & Rebay, S., A
 
4650
            ## high-order accurate discontinuous finite element method
 
4651
            ## for the numerical solution of the compressible
 
4652
            ## Navier-Stokes equations, Journal Of Computational
 
4653
            ## Physics, 1997, 131, 267-279
 
4654
            element diffusion_scheme {
 
4655
              attribute name{"BassiRebay"}
 
4656
            }
 
4657
         )
 
4658
      }
 
4659
   )
 
4660
 
 
4661
spatial_control_volume_options = standard_control_volume_options
 
4662
spatial_control_volume_options |= compressive_control_volume_options
 
4663
 
 
4664
standard_control_volume_options = 
 
4665
   (
 
4666
      ## First Order Upwind face value discretisation
 
4667
      ##  face_value = donor_value, 
 
4668
      ## where
 
4669
      ##  donor_value = income*val_1 + (1.-income)*val_2, 
 
4670
      ## where val_i is the value on the ith node neighbouring the face and
 
4671
      ## income = [0, 1] depending on whether the flow is coming from node 1 or 2
 
4672
      ## First order upwinding is monotonic so no limiting is ever required
 
4673
      element face_value {
 
4674
        attribute name { "FirstOrderUpwind" },
 
4675
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 0,1" },
 
4676
        empty
 
4677
      }|
 
4678
      ## Trapezoidal face value discretisation
 
4679
      ##  face_value = 0.5*(val_1 + val_2), 
 
4680
      ## where
 
4681
      ##  val_i is the value on the ith node neighbouring the face
 
4682
      ##
 
4683
      ## Trapezoidal discretisation is unbounded so limiting is compulsory
 
4684
      element face_value {
 
4685
        attribute name { "Trapezoidal" },
 
4686
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 2,3" },
 
4687
        limiter_options
 
4688
      }|
 
4689
      ## Finite Element face value discretisation
 
4690
      ##  face_value = finite element interpolation from surrounding nodes
 
4691
      ##
 
4692
      ## Finite element discretisation may become unbounded so limiting is often necessary.
 
4693
      element face_value {
 
4694
        attribute name { "FiniteElement" },
 
4695
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 4,5,6,7" },
 
4696
        limiter_options?
 
4697
      }
 
4698
   )
 
4699
   
 
4700
coupled_spatial_control_volume_options = coupled_control_volume_options
 
4701
coupled_spatial_control_volume_options |= compressive_control_volume_options
 
4702
 
 
4703
# coupled control volume options are the same as the standard ones (annoyingly copied and pasted)
 
4704
# except that firstorderupwind gets limiter options
 
4705
coupled_control_volume_options = 
 
4706
   (
 
4707
      ## First Order Upwind face value discretisation
 
4708
      ##  face_value = donor_value, 
 
4709
      ## where
 
4710
      ##  donor_value = income*val_1 + (1.-income)*val_2, 
 
4711
      ## where val_i is the value on the ith node neighbouring the face and
 
4712
      ## income = [0, 1] depending on whether the flow is coming from node 1 or 2
 
4713
      ## First order upwinding is monotonic so no limiting is ever required
 
4714
      element face_value {
 
4715
        attribute name { "FirstOrderUpwind" },
 
4716
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 0,1" },
 
4717
        limiter_options?
 
4718
      }|
 
4719
      ## Trapezoidal face value discretisation
 
4720
      ##  face_value = 0.5*(val_1 + val_2), 
 
4721
      ## where
 
4722
      ##  val_i is the value on the ith node neighbouring the face
 
4723
      ##
 
4724
      ## Trapezoidal discretisation is unbounded so limiting is compulsory
 
4725
      element face_value {
 
4726
        attribute name { "Trapezoidal" },
 
4727
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 2,3" },
 
4728
        limiter_options
 
4729
      }|
 
4730
      ## Finite Element face value discretisation
 
4731
      ##  face_value = finite element interpolation from surrounding nodes
 
4732
      ##
 
4733
      ## Finite element discretisation may become unbounded so limiting is often necessary.
 
4734
      element face_value {
 
4735
        attribute name { "FiniteElement" },
 
4736
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 4,5,6,7" },
 
4737
        limiter_options?
 
4738
      }
 
4739
   )
 
4740
   
 
4741
compressive_control_volume_options = 
 
4742
   (
 
4743
      ## HyperC face value discretisation
 
4744
      ##
 
4745
      ## face_value calculated from upper bound of explicit TVD zone of NVD diagram
 
4746
      ## Normally used for MaterialVolumeFraction fields
 
4747
      element face_value {
 
4748
        attribute name { "HyperC" },
 
4749
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 8,9" },
 
4750
        upwind_value_options?,
 
4751
        cv_face_cfl_number_options
 
4752
      }|
 
4753
      ## UltraC face value discretisation
 
4754
      ##
 
4755
      ## face_value calculated from extended upper bound of
 
4756
      ## explicit TVD zone of NVD diagram assuming
 
4757
      ## values bounded by target_maximum and target_minimum.
 
4758
      element face_value {
 
4759
        attribute name { "UltraC" },
 
4760
        attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 8,9, with ULTRAC = TRUE from solidity_options.inp" },
 
4761
        ## Specifiy the upper bound which UltraC will use to
 
4762
        ## calculate the maximum flux.
 
4763
        element target_maximum {
 
4764
            real
 
4765
        },
 
4766
        ## Specifiy the lower bound which UltraC will use to
 
4767
        ## calculate the minimum flux.
 
4768
        element target_minimum {
 
4769
            real
 
4770
        },
 
4771
        upwind_value_options?,
 
4772
        cv_face_cfl_number_options
 
4773
      }|
 
4774
      ## **UNDER TESTING**
 
4775
      ##
 
4776
      ## PotentialUltraC face value discretisation
 
4777
      ##
 
4778
      ## face_value calculated from extended upper bound of
 
4779
      ## explicit TVD zone of NVD diagram if potential
 
4780
      ## value of field is sufficient (as specified by
 
4781
      ## target_maximum) to ensure the correct front advection
 
4782
      ## velocity.
 
4783
      ##
 
4784
      ## If not then either switch to HyperC or use a modified flux
 
4785
      ## based on the potential function.
 
4786
      element face_value {
 
4787
        attribute name { "PotentialUltraC" },
 
4788
        ## Specifiy the upper bound which PotentialUltraC will use
 
4789
        ## to calculate the maximum flux if the potential function
 
4790
        ## value is sufficient to maintain the correct front
 
4791
        ## advection velocity.
 
4792
        element target_maximum {
 
4793
            real
 
4794
        },
 
4795
        ## Specifiy the lower bound which PotentialUltraC will use to calculate the minimum flux.
 
4796
        element target_minimum {
 
4797
            real
 
4798
        },
 
4799
        (
 
4800
            ## Select what PotentialUltraC should do if the
 
4801
            ## potential function value does not reach the required
 
4802
            ## value specified by the target_maximum.
 
4803
            ##
 
4804
            ## Switch to using HyperC face values.  This ensures
 
4805
            ## that the advection velocity is correct however may
 
4806
            ## create isolated regions beneath the target_maximum.
 
4807
            element switch_to_hyperc {
 
4808
              empty
 
4809
            }|
 
4810
            ## Select what PotentialUltraC should do if the
 
4811
            ## potential function value does not reach the required
 
4812
            ## value specified by the target_maximum.
 
4813
            ##
 
4814
            ## Modify the maximum nodal values (both downwind and
 
4815
            ## upwind) so that the fluxes are at their maximum
 
4816
            ## possible without affecting the front advection
 
4817
            ## velocity.
 
4818
            element use_potential_flux {
 
4819
              empty
 
4820
            }
 
4821
        ),
 
4822
        upwind_value_options?,
 
4823
        cv_face_cfl_number_options
 
4824
      }
 
4825
   )
 
4826
 
 
4827
#Select the type of dynamic control to be used
 
4828
#Note: DEM and FEMDEM require the respective libraries
 
4829
#to be compiled.
 
4830
input_solid_dynamics_choice =         
 
4831
   (
 
4832
      ## Obtain values from point and radius file.
 
4833
      ##
 
4834
      ## First line of file is free to use (for comments)
 
4835
      ## Second line must contain the number of particles
 
4836
      ## Third and fourth line are again for comments. 
 
4837
      ## Following lines include 10 columns, corresponding to 
 
4838
      ## the particle's x, y, and z positions, followed by the radius, then
 
4839
      ## velocities in x, y, and z directions, followed by angular velocities
 
4840
      ## in the x, y, and z directions.
 
4841
      element dynamic_type {
 
4842
         attribute name {"from_input_file"},
 
4843
         attribute file_name {xsd:string}
 
4844
      }|
 
4845
      ## Two python scripts must be provided. The script is cycled over each particle.
 
4846
      ## One script for particle position (output is tuple of position coords)
 
4847
      ## Second script is for particle radius (output is tuple of position coords)
 
4848
      ## Third script is for particle translational velocity.
 
4849
      ## Fourth script is for particle angular velocity. (Note: particles 
 
4850
      ## have a no slip boundary condition at the surface, so this angular velocity
 
4851
      ## WILL matter to the flow.)
 
4852
      ## Python functions should be of the form:
 
4853
      ##  def val(X, t):
 
4854
      ##    Function code
 
4855
      ##    return # Return value
 
4856
      ## where X is a tuple of length geometry dimension.
 
4857
      ##    X[0] contains the number of the particle (in real format)
 
4858
      element dynamic_type {
 
4859
         attribute name {"python_script"}
 
4860
      }|
 
4861
      element dynamic_type {
 
4862
         attribute name {"use_simple_dynamics"},
 
4863
         element set_bottom{real},
 
4864
         element set_xmin{real},
 
4865
         element set_ymin{real},
 
4866
         element set_zmin{real},
 
4867
         element set_xmax{real},
 
4868
         element set_ymax{real},
 
4869
         element set_zmax{real}
 
4870
      }|
 
4871
      ## Using y3D to model dynamics. Filename of input file for y3D must
 
4872
      ## be specified.
 
4873
      element dynamic_type {
 
4874
         attribute name {"use_y3D"},
 
4875
         attribute file_name {xsd:string}
 
4876
      }|
 
4877
      ## Using femdem 2D to model dynamics. Filename of input file must
 
4878
      ## be specified.
 
4879
      element dynamic_type {
 
4880
         attribute name {"use_2Dfemdem"},
 
4881
         attribute file_name {xsd:string}
 
4882
      }|
 
4883
      ## Using femdem 3D to model dynamics. Filename of input file must
 
4884
      ## be specified.
 
4885
      element dynamic_type {
 
4886
         attribute name {"use_3Dfemdem"},
 
4887
         attribute file_name {xsd:string},
 
4888
         element quad2lin {
 
4889
            attribute file_name {xsd:string}
 
4890
         }
 
4891
      }         
 
4892
   )
 
4893
 
 
4894
cap_option =
 
4895
   (
 
4896
      ## Cap the min and max values of this field when using
 
4897
      ## it as a volume fraction to work out bulk material
 
4898
      ## properties.
 
4899
      ## No capping used if not selected.
 
4900
      element cap_values {
 
4901
         ## Set the upper bound on the field.
 
4902
         ## Defaults to huge(0.0)*epsilon(0.0) if not set.
 
4903
         element upper_cap {
 
4904
            real
 
4905
         }?,
 
4906
         ## Set the lower bound on the field.
 
4907
         ## Defaults to -huge(0.0)*epsilon(0.0) if not set.
 
4908
         element lower_cap {
 
4909
            real
 
4910
         }?
 
4911
      }
 
4912
   )
 
4913
 
 
4914
surface_tension_option =
 
4915
   (
 
4916
      element surface_tension {
 
4917
        ## Surface tension coefficient
 
4918
        element surface_tension_coefficient {
 
4919
          real
 
4920
        },
 
4921
        ## The equilibrium contact angle (in radians) with the boundaries identified by the surface ids
 
4922
        element equilibrium_contact_angle {
 
4923
          real,
 
4924
          ## Surface ids:
 
4925
          element surface_ids {
 
4926
              integer_vector
 
4927
          }
 
4928
        }?
 
4929
      }
 
4930
   )
 
4931
 
 
4932
limiter_options =
 
4933
  (
 
4934
      ## Limit the face value to satisfy a boundedness criterion.
 
4935
      element limit_face_value{
 
4936
        (
 
4937
          sweby_limiter|
 
4938
          ultimate_limiter
 
4939
        )
 
4940
      }
 
4941
  )
 
4942
 
 
4943
sweby_limiter = 
 
4944
  ## See "High-Resolution Schemes Using Flux Limiters for
 
4945
  ## Hyperblic Conservation-Laws", P. K. Sweby, 1984, Siam
 
4946
  ## Journal on Numerical Analysis, 21, 995-1011
 
4947
  element limiter {
 
4948
    attribute replaces { "MOD(INT(ABS(NDISOT)/1),10) = 2,3,4,5" },
 
4949
    attribute name {"Sweby"},
 
4950
    slope_options?,
 
4951
    upwind_value_options?
 
4952
  }
 
4953
 
 
4954
ultimate_limiter =
 
4955
  ## See "The Ultimate Conservative Difference Scheme Applied
 
4956
  ## to Unsteady One-Dimensional Advection", B. P. Leonard,
 
4957
  ## 1991, Computer Methods in Applied Mechanics and
 
4958
  ## Engineering, 88, 17-74
 
4959
  element limiter {
 
4960
    attribute name {"Ultimate"},
 
4961
    field_based_cfl_number_options,
 
4962
    upwind_value_options?
 
4963
  }
 
4964
 
 
4965
slope_options =
 
4966
   (
 
4967
      ## Control the upper and lower slopes of the NVD limiter
 
4968
      element slopes {
 
4969
         ## Defaults to Sweby, 1984 limiter (= 1.0) if unselected
 
4970
         element lower {
 
4971
            real
 
4972
         }?,
 
4973
         ## Defaults to Sweby, 1984 limiter (= 2.0) if unselected
 
4974
         element upper {
 
4975
            real
 
4976
         }?
 
4977
      }
 
4978
   )
 
4979
 
 
4980
upwind_value_options =
 
4981
   (
 
4982
      (
 
4983
         ## Select the method to be used for calculating the upwind value.
 
4984
         ## If not selected will default to project_upwind_value_from_point for
 
4985
         ## simplex element meshes and to a locally_bound_upwind_value for cube
 
4986
         ## element meshes.
 
4987
         ##
 
4988
         ## This method projects the upwind value from a point in the element just
 
4989
         ## upwind of the node pair straddling the face.  It is otherwise known as 
 
4990
         ## anisotropic limiting.
 
4991
         ## This is only available on simplex meshes as it involes a search around
 
4992
         ## the donor node to find the upwind element.
 
4993
         element project_upwind_value_from_point {
 
4994
            attribute replaces { "NDISOT > 0 on simplex meshes" },
 
4995
            ## When the donor node is on a domain boundary reflect the projection
 
4996
            ## back into the mesh.
 
4997
            element reflect_off_domain_boundaries {
 
4998
               empty
 
4999
            }?,
 
5000
            ## Constrain the projected value to be between the min and max of the
 
5001
            ## element values which it was found from.
 
5002
            element bound_projected_value_locally {
 
5003
               empty
 
5004
            }?,
 
5005
            ## Store the locations of the elements where the upwind values
 
5006
            ## are projected from for each node pair.
 
5007
            ## This inserts an integer csr matrix into state so is memory expensive but
 
5008
            ## saves a significant amount of time (searching around the neighbouring elements).
 
5009
            ## This is unsafe for moving meshes but should be ok for adaptive meshes.
 
5010
            element store_upwind_elements {
 
5011
               attribute replaces { "ABS(NDISOT) >= 1000" },
 
5012
               ## Store the quadrature locations within the elements
 
5013
               ## where the upwind values
 
5014
               ## are projected from for each node pair.
 
5015
               ## This inserts a real block csr matrix into state so is even more memory
 
5016
               ## expensive than just storing the upwind elements and
 
5017
               ## only saves a comparitively
 
5018
               ## marginal amount of time (as actually searching the
 
5019
               ## neighbouring elements is the
 
5020
               ## slowest bit, finding the quadrature is relatively easy).
 
5021
               element store_upwind_quadrature {
 
5022
                  attribute replaces { "ABS(NDISOT) >= 1000" },
 
5023
                  empty
 
5024
               }?
 
5025
            }?
 
5026
         }|
 
5027
         ## Select the method to be used for calculating the upwind value.
 
5028
         ## If not selected will default to project_upwind_value_from_point for
 
5029
         ## simplex element meshes and to a locally_bound_upwind_value for cube
 
5030
         ## element meshes.
 
5031
         ##
 
5032
         ## Projects the value of the advected variable from the downwind or donor node
 
5033
         ## using the interpolated gradient at the donor node in the
 
5034
         ## direction of the vector
 
5035
         ## connecting the node pair straddling the face.
 
5036
         ## This is available on all meshes (except if bounding the values).
 
5037
         element project_upwind_value_from_gradient {
 
5038
            (
 
5039
               ## Select which node to project from:
 
5040
               ## Project from the downwind node (Jasak et al., 1999) so that:
 
5041
               ## upwind_value = downwind_value - 2*gradient.vector
 
5042
               element project_from_downwind_value {
 
5043
                  comment
 
5044
               }|
 
5045
               ## Select which node to project from:
 
5046
               ## Project from the donor node so that:
 
5047
               ## upwind_value = donor_value - gradient.vector
 
5048
               element project_from_donor_value {
 
5049
                  comment
 
5050
               }
 
5051
            ),
 
5052
            ## When the donor node is on a domain boundary reflect the projection
 
5053
            ## back into the mesh.
 
5054
            element reflect_off_domain_boundaries {
 
5055
               empty
 
5056
            }?,
 
5057
            ## Constrain the projected value to be between the min and max of the
 
5058
            ## element values which surround it.
 
5059
            ## This is only available on simplex meshes as it involes a search around
 
5060
            ## the donor node to find the upwind element.
 
5061
            element bound_projected_value_locally {
 
5062
               ## Store the locations of the elements closest to the project value.
 
5063
               ## This inserts an integer csr matrix into state so is
 
5064
               ## memory expensive but
 
5065
               ## saves a significant amount of time (searching around
 
5066
               ## the neighbouring elements).
 
5067
               ## This is unsafe for moving meshes but should be ok for adaptive meshes.
 
5068
               element store_upwind_elements {
 
5069
                  comment
 
5070
               }?
 
5071
            }?
 
5072
         }|
 
5073
         ## Select the method to be used for calculating the upwind value.
 
5074
         ## If not selected will default to project_upwind_value_from_point for
 
5075
         ## simplex element meshes and to a locally_bound_upwind_value for cube
 
5076
         ## element meshes.
 
5077
         ##
 
5078
         ## Chooses an upwind value by selecting the maximum or minimum of the neighbouring
 
5079
         ## nodes depending on the local slope of the donor and downwind values.
 
5080
         ## Otherwise known as isotropic limiting.
 
5081
         ## This is available on all meshes.
 
5082
         element locally_bound_upwind_value {
 
5083
            attribute replaces { "all cube elements, NDISOT < 0 on simplex elements" },
 
5084
            empty
 
5085
         }|
 
5086
         ## Select the method to be used for calculating the upwind value.
 
5087
         ## If not selected will default to project_upwind_value_from_point for
 
5088
         ## simplex element meshes and to a locally_bound_upwind_value for cube
 
5089
         ## element meshes.
 
5090
         ##
 
5091
         ## Chooses an upwind value by selecting the value at the node most directy
 
5092
         ## upwind from the vector connecting the donor and downwind nodes.
 
5093
         ## This is available on all meshes.
 
5094
         element pseudo_structured_upwind_value {
 
5095
            empty
 
5096
         }
 
5097
      )
 
5098
   )
 
5099
 
 
5100
field_based_cfl_number_options =
 
5101
   (
 
5102
      (
 
5103
         ## Select the Courant Number definition to be used.
 
5104
         ##
 
5105
         ## This uses the control volume definition of the CFL Number.
 
5106
         element courant_number {
 
5107
            attribute name { "ControlVolumeCFLNumber" },
 
5108
            empty
 
5109
         }|
 
5110
         ## ***UNDER TESTING***
 
5111
         ##
 
5112
         ## Select the Courant Number definition to be used.
 
5113
         ##
 
5114
         ## This uses the control volume definition of the CFL Number.
 
5115
         element courant_number {
 
5116
            attribute name { "CVMaterialDensityCFLNumber" },
 
5117
            empty
 
5118
         }|
 
5119
         ## Select the Courant Number definition to be used.
 
5120
         ##
 
5121
         ## This uses the finite element approximation of the CFL Number.
 
5122
         element courant_number {
 
5123
            attribute name { "CFLNumber" },
 
5124
            empty
 
5125
         }|
 
5126
         ## Select the Courant Number definition to be used.
 
5127
         element courant_number {
 
5128
            attribute name { string },
 
5129
            empty
 
5130
         }
 
5131
      )
 
5132
   )
 
5133
 
 
5134
cv_face_cfl_number_options =
 
5135
   (
 
5136
      (
 
5137
         ## Select the Courant Number definition to be used in the slope of
 
5138
         ## the NVD diagram upper bound.
 
5139
         ## This uses the finite difference definition of the CFL Number
 
5140
         ## consistent with the 1D version of HyperC (Leonard, 1981).
 
5141
         ## This is the default that reproduces old behaviour.
 
5142
         ## All others are under testing or construction.
 
5143
         element courant_number {
 
5144
            attribute name { "FiniteDifferenceCFLNumber" },
 
5145
            empty
 
5146
         }|
 
5147
         ## Select the Courant Number definition to be used in the slope of
 
5148
         ## the NVD diagram upper bound.
 
5149
         ## This uses the control volume definition of the CFL Number.
 
5150
         element courant_number {
 
5151
            attribute name { "ControlVolumeCFLNumber" },
 
5152
            empty
 
5153
         }|
 
5154
         ## ***UNDER TESTING***
 
5155
         ##
 
5156
         ## Select the Courant Number definition to be used in the slope of
 
5157
         ## the NVD diagram upper bound.
 
5158
         ## This uses a control volume definition of the CFL Number
 
5159
         ## that incorporates the MaterialDensity.
 
5160
         ## Requires a MaterialDensity field in this material_phase!
 
5161
         element courant_number {
 
5162
            attribute name { "CVMaterialDensityCFLNumber" },
 
5163
            empty
 
5164
         }|
 
5165
         ## ***UNDER TESTING***
 
5166
         ##
 
5167
         ## Select the Courant Number definition to be used in the slope of
 
5168
         ## the NVD diagram upper bound.
 
5169
         ## This uses the finite element approximation of the CFL Number.
 
5170
         element courant_number {
 
5171
            attribute name { "CFLNumber" },
 
5172
            empty
 
5173
         }|
 
5174
         ## ***UNDER TESTING***
 
5175
         ##
 
5176
         ## Select the Courant Number definition to be used in the slope of
 
5177
         ## the NVD diagram upper bound.
 
5178
         element courant_number {
 
5179
            attribute name { string },
 
5180
            empty
 
5181
         }
 
5182
      )
 
5183
   )
 
5184
 
 
5185
timestep_cfl_number_options =
 
5186
   (
 
5187
      (
 
5188
         ## Select the Courant Number definition to be used for adaptive timestepping.
 
5189
         ## This uses the finite element approximation of the CFL Number.
 
5190
         element courant_number {
 
5191
            attribute name { "CFLNumber" },
 
5192
              ## Select the mesh on which you wish to evaluate the CFLNumber.
 
5193
              velocity_mesh_choice
 
5194
         }|
 
5195
         ## Select the Courant Number definition to be used for adaptive timestepping.
 
5196
         ## This uses the control volume definition of the CFL Number.
 
5197
         element courant_number {
 
5198
            attribute name { "ControlVolumeCFLNumber" },
 
5199
              ## Select the mesh on which you wish to evaluate the ControlVolumeCFLNumber.
 
5200
              velocity_mesh_choice
 
5201
         }
 
5202
      )
 
5203
   )
 
5204
 
 
5205
mixing_stats =
 
5206
   (
 
5207
      ## Enable to include in the .stat file the fractions of the
 
5208
      ## scalar field contained in
 
5209
      ## bins specified by the user. This allows mixing of the field to be quantified.
 
5210
      ## Replaces and expands upon the old heaviside.dat file
 
5211
      element include_mixing_stats{
 
5212
         attribute name { xsd:string },
 
5213
         attribute replaces { "heaviside.dat file" },
 
5214
         (
 
5215
            ## Select whether to evaluate the volume fraction over the finite element
 
5216
            ## (continuous galerkin) or within the control volume (control_volumes).
 
5217
            ##
 
5218
            ## NOTE: continuous_galerkin only works with linear tets
 
5219
            ##
 
5220
            ## NOTE: continuous_galerkin is not fully validated yet
 
5221
            element continuous_galerkin {
 
5222
               ## if select normalise the volume fractions will be
 
5223
               ## divided by the total volume of the domain
 
5224
               element normalise {
 
5225
                  empty
 
5226
               }?
 
5227
            }|
 
5228
            ## Select whether to evaluate the volume fraction over the finite element
 
5229
            ## (continuous galerkin) or within the control volume (control_volumes).
 
5230
            element control_volumes {
 
5231
               ## if select normalise the volume fractions will be divided by the total volume of the domain  
 
5232
               element normalise {
 
5233
                  empty
 
5234
               }?
 
5235
            }
 
5236
         ),
 
5237
         ## The values of the bounds of the bins 
 
5238
         ## e.g. the values 0 1 2 3 will return 4 bins 
 
5239
         ## and the fraction of the field in each bin with,
 
5240
         ## 0<=field<1, 1<=field<2, 2<=field<3, 3<=field, 
 
5241
         ## will be calculated. 
 
5242
         element mixing_bin_bounds { 
 
5243
            real_vector 
 
5244
         },
 
5245
         ## Define the tolerance beneath the specified bins that should be included.
 
5246
         ## Defaults to zero at machine tolerance (epsilon(0.0)) if not selected.
 
5247
         element tolerance {
 
5248
            real
 
5249
         }?
 
5250
      }
 
5251
   )
 
5252
 
 
5253
cv_stats =
 
5254
   (
 
5255
      ## Include statistics evaluated on the control volume mesh.
 
5256
      element include_cv_stats {
 
5257
         empty
 
5258
      }
 
5259
   )
 
5260
 
 
5261
# Options for inclusion of calculations of surface integrals in the .stat file   
 
5262
surface_integral_stats_base.surface_integral =
 
5263
   (
 
5264
      attribute name { xsd:string },
 
5265
      ## Surface IDs defining the surface over which to integrate. If disabled, integrates over the whole surface.
 
5266
      element surface_ids {
 
5267
         integer_vector
 
5268
      }?,
 
5269
      ## Enable to normalise the integral by dividing by the surface area
 
5270
      element normalise {
 
5271
         comment
 
5272
      }?
 
5273
   )
 
5274
surface_integral_stats_scalar =
 
5275
   (
 
5276
      ## Surface integral calculations. The following integral types are available:
 
5277
      ##  value: Integrates the field
 
5278
      ##  gradient_normal: Integrates the normal component of the gradient of the field
 
5279
      element surface_integral {
 
5280
         surface_integral_stats_scalar.surface_integral
 
5281
      }
 
5282
   )
 
5283
surface_integral_stats_scalar.surface_integral = surface_integral_stats_base.surface_integral
 
5284
surface_integral_stats_scalar.surface_integral &=
 
5285
   (
 
5286
      attribute type { "value" | "gradient_normal" }
 
5287
   )
 
5288
surface_integral_stats_vector =
 
5289
   (
 
5290
      ## Surface integral calculations. The following integral types are available:
 
5291
      ##  normal: Integrates the normal component of the field
 
5292
      element surface_integral {
 
5293
         surface_integral_stats_vector.surface_integral
 
5294
      }
 
5295
   )
 
5296
surface_integral_stats_vector.surface_integral = surface_integral_stats_base.surface_integral
 
5297
surface_integral_stats_vector.surface_integral &=
 
5298
   (
 
5299
      attribute type { "normal" }
 
5300
   )
 
5301
 
 
5302
velocity_equation_choice =
 
5303
   (
 
5304
      ## Select the equation used to solve for velocity.
 
5305
      element equation {
 
5306
         attribute name { "ShallowWater" }
 
5307
      }
 
5308
   )
 
5309
 
 
5310
scalar_equation_choice =
 
5311
   (
 
5312
      (
 
5313
         ## Select the equation used to solve for this field.
 
5314
         ## Advection Diffusion is the norm for scalar fields.
 
5315
         ## Works for all discretisation types.
 
5316
         element equation { 
 
5317
            attribute name { "AdvectionDiffusion" }
 
5318
         }|
 
5319
         ## ***UNDER TESTING***
 
5320
         ##
 
5321
         ## Select the equation used to solve for this field.
 
5322
         ## Conservation of Mass equation - requires the selection of a Density field.
 
5323
         ## ONLY WORKS FOR CONTROL VOLUME DISCRETISATIONS WITHOUT A
 
5324
         ## DIFFUSIVITY, SOURCE OR ABSORPTION.
 
5325
         element equation { 
 
5326
            attribute name { "ConservationOfMass" },
 
5327
            (
 
5328
               ## Select density to use in the Conservation of Mass Equation
 
5329
               ## Use the MaterialDensity - useful for multimaterial simulations
 
5330
               ## Clearly this requires a MaterialDensity field to be present
 
5331
               element density {
 
5332
                  attribute name { "MaterialDensity" }
 
5333
               }|
 
5334
               ## Select density to use in the Conservation of Mass Equation
 
5335
               ## Use the bulk Density
 
5336
               ## Clearly this requires a Density field to be present
 
5337
               element density {
 
5338
                  attribute name { "Density" }
 
5339
               }|
 
5340
               ## Select density to use in the Conservation of Mass Equation
 
5341
               element density {
 
5342
                  attribute name { string }
 
5343
               }
 
5344
            )
 
5345
         }|
 
5346
         ## ***UNDER TESTING***
 
5347
         ##
 
5348
         ## Select the equation used to solve for this field.
 
5349
         ## Reduced Conservation of Mass equation - requires the selection of a Density field.
 
5350
         ##
 
5351
         ## ONLY WORKS FOR CONTROL VOLUME DISCRETISATIONS WITHOUT A
 
5352
         ## DIFFUSIVITY, SOURCE OR ABSORPTION.
 
5353
         ##
 
5354
         ## This equation is very similar to a standard conservation of mass equation
 
5355
         ## except that the time discretisation uses only a single time level of density.
 
5356
         ## This enables consistency between the
 
5357
         ## MaterialVolumeFraction (ReducedConservationOfMass) and
 
5358
         ## MaterialDensity (Advection) equations in compressible multimaterial simulations.
 
5359
         element equation { 
 
5360
            attribute name { "ReducedConservationOfMass" },
 
5361
            (
 
5362
               ## Select density to use in the Reduced Conservation of Mass Equation
 
5363
               ## Use the MaterialDensity - useful for multimaterial simulations
 
5364
               ## Clearly this requires a MaterialDensity field to be present
 
5365
               element density {
 
5366
                  attribute name { "MaterialDensity" }
 
5367
               }|
 
5368
               ## Select density to use in the Reduced Conservation of Mass Equation
 
5369
               ## Use the bulk Density
 
5370
               ## Clearly this requires a Density field to be present
 
5371
               element density {
 
5372
                  attribute name { "Density" }
 
5373
               }|
 
5374
               ## Select density to use in the Reduced Conservation of Mass Equation
 
5375
               element density {
 
5376
                  attribute name { string }
 
5377
               }
 
5378
            )
 
5379
         }|
 
5380
         ## ***UNDER TESTING***
 
5381
         ##
 
5382
         ## Select the equation used to solve for this field.
 
5383
         ## Internal Energy equation - requires the selection of a Density field.
 
5384
         ## ONLY WORKS FOR CONTROL VOLUME DISCRETISATIONS WITHOUT A
 
5385
         ## DIFFUSIVITY, SOURCE OR ABSORPTION.
 
5386
         ## Solve the internal energy equation for this field.
 
5387
         ## Requires pressure and velocity fields to be present.
 
5388
         ## Uses a nonconservative time discretisation.
 
5389
         element equation {
 
5390
            attribute name { "InternalEnergy" },
 
5391
            (
 
5392
               ## Select density to use in the Internal Energy Equation
 
5393
               ## Use the MaterialDensity - useful for multimaterial simulations
 
5394
               ## Clearly this requires a MaterialDensity field to be present
 
5395
               ## Whatever field is selected must be present.
 
5396
               element density {
 
5397
                  attribute name { "MaterialDensity" }
 
5398
               }|
 
5399
               ## Select density to use in the Internal Energy Equation
 
5400
               ## Use the bulk Density
 
5401
               ## Clearly this requires a Density field to be present
 
5402
               ## Whatever field is selected must be present.
 
5403
               element density {
 
5404
                  attribute name { "Density" }
 
5405
               }|
 
5406
               ## Select density to use in the Internal Energy Equation
 
5407
               ## Whatever field is selected must be present.
 
5408
               element density {
 
5409
                  attribute name { string }
 
5410
               }
 
5411
            )
 
5412
         }|
 
5413
         ## Option to solve for electrical potential from
 
5414
         ## electrokinetic, electrochemical or electrothermal sources 
 
5415
         element equation { 
 
5416
            attribute name { "ElectricalPotential" }
 
5417
         }
 
5418
      )
 
5419
   )
 
5420
 
 
5421
inner_element_scalar = 
 
5422
   (
 
5423
      ## Inner element sub-grid scale model (Candy and Pain)
 
5424
      ## Requires continuous galerkin selected above.
 
5425
      element inner_element {
 
5426
         attribute replaces { "NSUBTLOC, NSUBNTLOC" },
 
5427
         ## Inner element solution of the scalar field.
 
5428
         element scalar_field {
 
5429
            attribute rank { "0" },
 
5430
            attribute name { "InnerElement" },
 
5431
            element prognostic {
 
5432
               element mesh {
 
5433
                  attribute name {  "InnerElementMesh" }
 
5434
               },
 
5435
               prognostic_scalar_output_options,
 
5436
               prognostic_scalar_stat_options,
 
5437
               prognostic_detector_options
 
5438
            }
 
5439
         }
 
5440
      }
 
5441
   )
 
5442
      
 
5443
inner_element_velocity =
 
5444
   (
 
5445
      ## Inner element sub-grid scale model (Candy and Pain)
 
5446
      ## Requires continuous galerkin selected above.
 
5447
      element inner_element {
 
5448
         attribute replaces { "NSUBVLOC, NSUBNVLOC" },
 
5449
         ## SGS velocity in an inner element SGS treatment of momentum
 
5450
         ##
 
5451
         ## Limitations:
 
5452
         ##  - Requires a geometry dimension of 3.
 
5453
         ##  - Requires inner element active for momentum
 
5454
         element vector_field {
 
5455
            attribute rank { "1" },
 
5456
            attribute name { "InnerElement" },
 
5457
            element prognostic {
 
5458
               element mesh {
 
5459
                  attribute name {  "InnerElementMesh" }
 
5460
               },
 
5461
               prognostic_vector_output_options,
 
5462
               prognostic_vector_stat_options,
 
5463
               vector_convergence_options
 
5464
            }
 
5465
         },
 
5466
         ## A filter for the sub-grid scale equations
 
5467
         ## Add diffusion to matrix D of the Inner Element model
 
5468
         element use_filter {
 
5469
            ## Strength of the diffusion term
 
5470
            ## Suggested value: 0.01
 
5471
            element strength {
 
5472
               real
 
5473
            },
 
5474
            empty
 
5475
         }?,
 
5476
         element use_quadratic_pressure {
 
5477
            attribute replaces { "PREOPT=PREOPT+1000" }
 
5478
         }?,
 
5479
         element apply_full_discontinuous_Galerkin {
 
5480
            attribute replaces { "PREOPT=PREOPT+10000" }
 
5481
         }?
 
5482
      }?
 
5483
   )
 
5484
forcing =
 
5485
  (
 
5486
    ## Add forcing from ocean data
 
5487
    ## If you enable this you MUST enable the /geometry/ocean_boundaries option too
 
5488
    element ocean_forcing{
 
5489
        ## The netCDF data file downloaded from ERA-40 reanalysis
 
5490
        element input_file {
 
5491
           attribute file_name {xsd:string} 
 
5492
        },
 
5493
        element mesh_choice {
 
5494
            velocity_mesh_choice
 
5495
        },
 
5496
        element surface_stress {
 
5497
            empty
 
5498
        }?,
 
5499
        element temperature_flux {
 
5500
            empty
 
5501
        }?,
 
5502
        element salinity_flux {
 
5503
            empty
 
5504
        }?,
 
5505
        element solar_radiation {
 
5506
            empty
 
5507
        }?
 
5508
    }
 
5509
  )
 
5510
 
 
5511
biology =
 
5512
   (
 
5513
      ## Model of biological processes in the ocean.
 
5514
      element ocean_biology{
 
5515
         ## A simple model of phytoplankton, zooplankton, general nutrient and detritus. 
 
5516
         element pznd {
 
5517
            (
 
5518
               ## Python code specifying the source and sink relationships 
 
5519
               ## between the biological tracers. This is usually achieved by 
 
5520
               ## importing fluidity.ocean_biology and calling a scheme from there. 
 
5521
               element source_and_sink_algorithm {
 
5522
                  python_code
 
5523
               }|
 
5524
               ## Do not calculate sources and sinks. 
 
5525
               ## This option is generally only useful for testing. 
 
5526
               element disable_sources_and_sinks {
 
5527
                  empty
 
5528
               }
 
5529
             ),
 
5530
#            ## Phytoplankton
 
5531
#            element scalar_field {
 
5532
#               attribute rank { "0" },
 
5533
#               attribute name { "Phytoplankton" },
 
5534
#               (
 
5535
#                  element prognostic {
 
5536
#                     velocity_mesh_choice,
 
5537
#                     prognostic_scalar_field
 
5538
#                  }|
 
5539
#                  element prescribed {
 
5540
#                     velocity_mesh_choice,
 
5541
#                     prescribed_scalar_field
 
5542
#                  }
 
5543
#               )
 
5544
#            },
 
5545
#            ## Zooplankton
 
5546
#            element scalar_field {
 
5547
#               attribute rank { "0" },
 
5548
#               attribute name { "Zooplankton" },
 
5549
#               (
 
5550
#                  element prognostic {
 
5551
#                     velocity_mesh_choice,
 
5552
#                     prognostic_scalar_field
 
5553
#                  }|
 
5554
#                  element prescribed {
 
5555
#                     velocity_mesh_choice,
 
5556
#                     prescribed_scalar_field
 
5557
#                  }
 
5558
#               )
 
5559
#            },
 
5560
#            ## Nutrient
 
5561
#            element scalar_field {
 
5562
#               attribute rank { "0" },
 
5563
#               attribute name { "Nutrient" },
 
5564
#               (
 
5565
#                  element prognostic {
 
5566
#                     velocity_mesh_choice,
 
5567
#                     prognostic_scalar_field
 
5568
#                  }|
 
5569
#                  element prescribed {
 
5570
#                     velocity_mesh_choice,
 
5571
#                     prescribed_scalar_field
 
5572
#                  }
 
5573
#               )
 
5574
#            },
 
5575
#            ## Detritus
 
5576
#            element scalar_field {
 
5577
#               attribute rank { "0" },
 
5578
#               attribute name { "Detritus" },
 
5579
#               (
 
5580
#                  element prognostic {
 
5581
#                     velocity_mesh_choice,
 
5582
#                     prognostic_scalar_field
 
5583
#                  }|
 
5584
#                  element prescribed {
 
5585
#                     velocity_mesh_choice,
 
5586
#                     prescribed_scalar_field
 
5587
#                  }
 
5588
#               )
 
5589
#            },
 
5590
            ## Photosynthetically Active Radiation (PAR)
 
5591
            element scalar_field {
 
5592
               attribute rank { "0" },
 
5593
               attribute name { "PhotosyntheticRadiation" },
 
5594
               (
 
5595
                  element prognostic {
 
5596
                     velocity_mesh_choice,
 
5597
                     prognostic_photosynthetic_radiation
 
5598
                  }|
 
5599
                  element prescribed {
 
5600
                     velocity_mesh_choice,
 
5601
                     prescribed_scalar_field
 
5602
                  }
 
5603
               )
 
5604
            }
 
5605
         }
 
5606
      }
 
5607
   )
 
5608
 
 
5609
 
 
5610
prognostic_photosynthetic_radiation =
 
5611
   (
 
5612
      ## PAR equation.
 
5613
      element equation { 
 
5614
         attribute name { "PhotosyntheticRadiation" }
 
5615
      },
 
5616
      ## Spatial discretisation options
 
5617
      element spatial_discretisation {
 
5618
         (
 
5619
            ## Discontinuous galerkin formulation. You can also use this
 
5620
            ## formulation with a continuous field in which case a simple
 
5621
            ## galerkin formulation will result. 
 
5622
            element discontinuous_galerkin {
 
5623
               empty
 
5624
            }
 
5625
         )
 
5626
      },
 
5627
      (
 
5628
         ## Solver
 
5629
         element solver {
 
5630
            linear_solver_options_asym
 
5631
         }
 
5632
      ),
 
5633
      ## Coefficients of absorption of photosynthetically active
 
5634
      ## radiation for water and phytoplankton.
 
5635
      element absorption_coefficients {
 
5636
         ## Photosynthetically active radiation absorption coefficient for water.
 
5637
         element water {
 
5638
            real
 
5639
         },
 
5640
         ## Photosynthetically active radiation absorption coefficient for water.
 
5641
         element phytoplankton {
 
5642
            real
 
5643
         }
 
5644
      },
 
5645
      ## Boundary conditions
 
5646
      element boundary_conditions {
 
5647
         attribute replaces { "boundary, TTPER1 TTPER2 TTPERI" },
 
5648
         attribute name { string },
 
5649
         ## Surface id:
 
5650
         element surface_ids {
 
5651
            integer_vector
 
5652
         },
 
5653
         ## Type
 
5654
         (
 
5655
            element type {
 
5656
               attribute name { "dirichlet" },
 
5657
               ## Apply the dirichlet bc weakly.  Only available with
 
5658
               ## discontinuous_galerkin, control_volume and
 
5659
               ## legacy_mixed_cv_cg spatial_discretisations.
 
5660
               ##
 
5661
               ## If not selected boundary conditions are applied strongly.
 
5662
               element apply_weakly {
 
5663
                 empty
 
5664
               },
 
5665
               input_choice_real
 
5666
            }|
 
5667
            element type {
 
5668
               attribute name { "neumann" },
 
5669
               input_choice_real
 
5670
            }|
 
5671
            element type {
 
5672
               attribute name { "robin" },
 
5673
               element order_zero_coefficient {
 
5674
                  input_choice_real
 
5675
               },
 
5676
               element order_one_coefficient {
 
5677
                  input_choice_real
 
5678
               }
 
5679
            }
 
5680
         )
 
5681
      }+,
 
5682
      prognostic_scalar_output_options,
 
5683
      prognostic_scalar_stat_options,
 
5684
      scalar_convergence_options,
 
5685
      prognostic_detector_options,
 
5686
      scalar_steady_state_options,
 
5687
      adaptivity_options_scalar_field,
 
5688
      ## Set the priority of this field
 
5689
      ## This determines the order in which scalar_fields are solved for:
 
5690
      ##  - higher numbers have the highest priority
 
5691
      ##  - lower numbers (including negative) have the lowest priority
 
5692
      ##  - default if not set is 0
 
5693
      element priority {
 
5694
         integer
 
5695
      }?
 
5696
   )
 
5697
 
 
5698
recalculation_options =
 
5699
   (
 
5700
      ## Prevent this field from being recalculated at every timestep.
 
5701
      ## This is cheaper especially if you are enforcing discrete properties on the field.
 
5702
      element do_not_recalculate {
 
5703
        empty
 
5704
      }
 
5705
   )
 
5706
 
 
5707
discrete_properties_algorithm_scalar =
 
5708
   (
 
5709
      ## Select discrete properties to enforce on the field
 
5710
      ## either after being prescribed or interpolated
 
5711
      element enforce_discrete_properties {
 
5712
        ## Update this field using the lagrangian multiplier
 
5713
        ## calculated in the solenoidal projection of a
 
5714
        ## scalar field.
 
5715
        ##
 
5716
        ## Note this field must be specified as the update field
 
5717
        ## underneath that vector field too.
 
5718
        ##
 
5719
        ## Note also this only really makes sense for coupled
 
5720
        ## fields like velocity and pressure.
 
5721
        element solenoidal_lagrange_update {
 
5722
          empty
 
5723
        }?
 
5724
      }
 
5725
   )
 
5726
 
 
5727
discrete_properties_algorithm_vector =
 
5728
   (
 
5729
      ## Select discrete properties to enforce on the field
 
5730
      ## either after being prescribed or interpolated
 
5731
      element enforce_discrete_properties {
 
5732
        solenoidal_options?
 
5733
      }
 
5734
   )
 
5735
 
 
5736
solenoidal_options =
 
5737
    ## Constrained divergence-free projection.
 
5738
    ## This adds an additional constraint that ensures that the field
 
5739
    ## is solenoidal, i.e. divergence-free.
 
5740
    ## This is equivalent in cost to a pressure solve.
 
5741
    ## This is expensive, and thus best left until
 
5742
    ## needed.
 
5743
    ##
 
5744
    ## Note well: this only makes sense for nondivergent
 
5745
    ## vector fields, such as incompressible velocity!
 
5746
    element solenoidal {
 
5747
      ## Options for the mass matrix of the field being interpolated
 
5748
      element interpolated_field {
 
5749
        (
 
5750
          element continuous {
 
5751
            ## Lump the mass matrix for the assembly of the projection matrix
 
5752
            ## (not for the initial galerkin projection)
 
5753
            ##
 
5754
            ## Required when using interpolating continuous fields
 
5755
            element lump_mass_matrix {
 
5756
              ## Lump on the submesh.
 
5757
              ## This only works for simplex meshes and is only
 
5758
              ## strictly valid on 2d meshes.
 
5759
              element use_submesh {
 
5760
                empty
 
5761
              }?
 
5762
            }
 
5763
          }|
 
5764
          element discontinuous {
 
5765
            ## Lump the mass matrix for the assembly of the projection matrix
 
5766
            ## (not for the initial galerkin projection)
 
5767
            element lump_mass_matrix {
 
5768
              empty
 
5769
            }?
 
5770
          }
 
5771
        )
 
5772
      },
 
5773
      ## Options for the lagrange multiplier
 
5774
      ##
 
5775
      ## Must be on a continuous mesh!
 
5776
      element lagrange_multiplier {
 
5777
        pressure_mesh_choice,
 
5778
        element spatial_discretisation {
 
5779
          (
 
5780
            element continuous_galerkin {
 
5781
              ## Remove the stabilisation term from the projection operator.
 
5782
              ##
 
5783
              ## Automatic when not using P1P1.
 
5784
              element remove_stabilisation_term {
 
5785
                empty
 
5786
              }?,
 
5787
              ## Integrate the divergence operator by parts.
 
5788
              ##
 
5789
              ## Automatic when projecting a discontinuous field
 
5790
              element integrate_divergence_by_parts {
 
5791
                empty
 
5792
              }?
 
5793
            }|
 
5794
            element control_volumes {
 
5795
              empty
 
5796
            }
 
5797
          )
 
5798
        },
 
5799
        element reference_node {
 
5800
          integer
 
5801
        }?,
 
5802
        (
 
5803
          ## Update a scalar field using the lagrange multiplier from
 
5804
          ## the divergence free projection of this field.  The selected
 
5805
          ## scalar field must have solenoidal selected in its interpolation
 
5806
          ## options too and it must be on the same mesh as used for the
 
5807
          ## solenoidal projection above.
 
5808
          ##
 
5809
          ## Note well: this only really makes sense for scalar fields linked to nondivergent
 
5810
          ## vector fields, such as pressure to incompressible velocity!                  
 
5811
          element update_scalar_field {
 
5812
            attribute name { "Pressure" },
 
5813
            empty
 
5814
          }|
 
5815
          ## Update a scalar field using the lagrange multiplier from
 
5816
          ## the divergence free projection of this field.  The selected
 
5817
          ## scalar field must have solenoidal selected in its interpolation
 
5818
          ## options too and it must be on the same mesh as used for the
 
5819
          ## solenoidal projection above.
 
5820
          ##
 
5821
          ## Note well: this only really makes sense for scalar fields linked to nondivergent
 
5822
          ## vector fields, such as pressure to incompressible velocity!                  
 
5823
          element update_scalar_field {
 
5824
            attribute name { string },
 
5825
            empty
 
5826
          }
 
5827
        )?,
 
5828
        ## Solver options for the linear solve.
 
5829
        ## This method requires the inversion of a projection matrix.
 
5830
        element solver {
 
5831
          linear_solver_options_sym
 
5832
        }
 
5833
      }
 
5834
    }
 
5835
 
 
5836
represcribe_before_interpolation =
 
5837
    ## Represcribe the field before interpolation.
 
5838
    ##
 
5839
    ## This means the interpolation will not be conservative from the previous mesh so be careful what you're trying to achieve!
 
5840
    element represcribe_before_interpolation {
 
5841
      empty
 
5842
    }
 
5843