In order to avoid conflict with the use of ':' in model-specific fields,
e.g. "thermo:rho", in the "slash" syntax the '!' character is now used to refer
to the top-level dictionary.
If there is a part of the keyword before the '!' then this is taken to be the
file name of the dictionary from which the entry will be looked-up using the
part of the keyword after the '!'.
For example, given a dictionary file named testSlashDict2:
internalField 5.6;
active
{
type fixedValue;
value.air $internalField;
}
it is now possible to read entries from it directly in the dictionary file testSlashDict:
external
{
value $testSlashDict2!active/value.air;
}
active2
{
$testSlashDict2!active;
}
which expands to
external
{
value 5.6;
}
active2
{
type fixedValue;
value.air 5.6;
}
Arc-edges can now be specified with a sector angle (in degrees) and an
axis of the circle of which the arc forms a part. The new syntax is as
follows:
edges
(
arc <vertex-0> <vertex-1> <angle> (<axis-x> <axis-y> <axis-z>)
);
This is often more convenient than the alternative specification where a
third third point somewhere in the arc is given; it usually does not
require any additional calculation on the part of the user, and multiple
entries are very likely to be identical.
Which specification is used depends on the form of the entry that comes
after the two vertices. If the entry is a vector then it is assumed to
be a point in the arc; if it is scalar then is is taken to be the angle
and the axis is assumed to follow.
For example, to put a 90 degree arc between the vertices 12 and 13, at
(1 0 0) and (0 1 0) respectively, the following specification can now be
used:
edges
(
arc 12 13 90.0 (0 0 1)
);
This is equivalent to the existing point-in-arc speficiation below:
edges
(
arc 12 13 (0.707107 0.707107 0)
);
An edge's points are ordered on the perimeter of the circle according to
a right-hand screw rule on the given axis. Changing the the side of the
edge on which the arc is defined can therefore be achieved by reversing
either the edge or the direction of the axis.
If the given axis is not perpendicular to the line between the vertices,
then the arc gains some axial length and becomes a helix.
A new optional "slash" scoping syntax is now provided which is more intuitive
than the current "dot" syntax as it corresponds to the common directory/file
access syntax used in UNIX, and avoids limitations of the "dot" (see below)
e.g.
internalField 3.4;
active
{
type fixedValue;
value.air $internalField;
}
inactive
{
type anotherFixedValue;
value $../active/value.air;
anotherValue $:active/value.air;
sub
{
value $../../active/value.air;
anotherValue $:active/value.air;
}
}
"U.*"
{
solver GAMG;
}
e.air
{
// This does expand
$U.air;
}
"#inputSyntax slash;" selects the new "slash" syntax.
"../" refers to the parent directory.
":" refers to the top-level directory.
The corresponding dictionary using the current "dot" syntax is
internalField 3.4;
active
{
type fixedValue;
value.air $internalField;
}
inactive
{
type anotherFixedValue;
value $..active.value.air;
anotherValue $:active.value.air;
sub
{
value $...active.value.air;
anotherValue $:active.value.air;
}
}
"U.*"
{
solver GAMG;
}
e.air
{
// This doesn't expand
$U.air;
}
Note that the "$U.air" expansion does not work in this case due to the
interference between the use of '.' for scoping and phase-name.
This is a fundamental problem which prompted the development of the new more
intuitive and flexible "slash" syntax.
The new syntax also allows a for planned future development to access entries
in directories in other files, e.g.
active
{
type fixedValue;
value.air $FOAM_CASE/internalFieldValues/value.air;
}
or
active
{
type fixedValue;
value.air :../internalFieldValues/value.air;
}
This implicit isotropic damping function relaxes the velocity field towards a
specified uniform value which can be set to (0 0 0) if no flow is required.
This is particularly appropriate to damp the waves in a closed wave tank with no
mean flow.
Testing on the interFoam wave has shown that for this simple case with uniform
mean flow the new isotropicDamping fvOption provides more rapid and complete
damping than the original verticalDamping.
Results for nutkRoughWallFunction and nutURoughWallFunction are now reasonably
consistent and both are now more robust and handle small near-wall cells more
reliably. However if the wall roughness height is large, ~domain width, the
nutURoughWallFunction produces a lot less realistic results than the
nutkRoughWallFunction which appears to behave surprisingly well.
Now both the nutkRoughWallFunction and nutURoughWallFunction us the same field
based Ks and Cs input to support non-uniform surface roughness.
Note that nutURoughWallFunction is not exactly consistent with the
nutUWallFunction in the limit of roughness height = 0 and also not consistent
with nutkRoughWallFunction, particularly if the near-wall cell is in the laminar
sub-layer for which nutURoughWallFunction is currently incorrect.
Significant further work on the nutURoughWallFunction is needed to make it
consistent with both the nutUWallFunction and nutkRoughWallFunction BCs.
This wall function is now stable even if the near-wall cell centre distance is
less than the roughness height although it is unlikely to be very accurate if
used in this way.
The sudden change limit stabilisation has been re-implemented to avoid the
near-wall viscosity being lower limited to half the laminar viscosity which has
no physical meaning.
and copy assignment operator for classes with a copy constructor
This is often described as the rule of 3 (or rule of 5 in C++11 if move
constructors and assignment operators are also defined) and makes good sense in
ensuring consistency. For classes in which the default bitwise copy constructor
or assignment operator are appropriate these are now specified explicitly using
the "= default" keyword if the other is explicitly defined fulfilling the rule
of 3 without the need to define the body of the function.
Perpendicular vectors should be generated using the global
"perpendicular" function, which guarantees a non-zero result without a
random number generator and without looping.
All wall functions now operate collaboratively, obtaining the Cmu, kappa and E
coefficients and yPlusLam from the nutWallFunction base class. Now these
optional inputs need only be specified in the nut boundary condition with the k,
epsilon, omega, v2 and f wall functions obtaining these values from there. This
is much simpler to specify and avoids inconsistencies in the operation of the
wall functions for the different turbulence fields.
The code has also been rationalised and simplified avoiding unnecessary code
and duplication.
Currently these deleted function declarations are still in the private section
of the class declarations but will be moved by hand to the public section over
time as this is too complex to automate reliably.