Class
Foam::functionEntries::if
Description
Conditional parsing of dictionary entries.
E.g.
\verbatim
U_inlet 15;
#if #calc "${U_inlet} < 10"
..
#else
..
#endif
\endverbatim
Note:
- only supports single line, '\' is not supported
- condition should be readable as a \c Switch
(supports 0,1, true, false, etc.)
Class
Foam::functionEntries::ifeqEntry
Description
Conditional parsing of dictionary entries.
E.g.
\verbatim
a #calc "0.123";
b 1.23e-1;
#ifeq $a $b
..
#else
..
#endif
\endverbatim
\verbatim
ddtSchemes
{
#ifeq ${FOAM_APPLICATION} simpleFoam
default steadyState;
#else
default Euler;
#endif
}
\endverbatim
Note:
- supports dictionary variables and environment variables
- the two arguments should be two tokens
- the comparison is a string comparison for any word/string/variable,
integer comparison for two integers and floating point comparison for
any floating point number.
- parsing of (non)matching \c #else, \c #endif is not very sophisticated
Contributed by Mattijs Janssens
A new "-empty" option launches ParaView without opening any files. This enables users
to run ParaView using the paraFoam script for all data (OpenFOAM or otherwise), making
use of the automatic launching with Mesa if system OpenGL fails.
To view OpenFOAM case files, run "paraFoam".
To view other data files, run "paraFoam -empty" and open the files within ParaView.
Registration occurs when the temporary field is transferred to a non-temporary
field via a constructor or if explicitly transferred to the database via the
regIOobject "store" methods.
With the inclusion of boundary layer modelling in the gas, the
separation of wave perturbation from and mean flow became less useful,
and potentially prevents further extension to support similar boundary
layer modelling in the liquid.
The mean velocity entry, UMean, is now needed in the
constant/waveProperties file rather than in the waveVelocity boundary
condition.
An atmospheric boundary layer velocity can now be added to the gas side
of the wave modelling. The wave superposition class has been given a
run-time selection mechanism, and a derivation added which includes gas
atmospheric boundary layer modelling. This modelling is therefore
available in both the wave boundary conditions, and in setWaves.
This functionality can be selected in the constant/waveProperties file
by supplying a "type" entry and a number of parameters controlling the
boundary layer. For example:
In constant/waveProperties:
type waveAtmBoundaryLayer;
// properties specifying the wave modelling ...
UGasRef (10 0 0);
hRef 20;
hWaveMin -2;
hWaveMax 3;
UGasRef is the gas velocity relative to the liquid, at the height, hRef,
relative to the wave model origin. hWaveMin and hWaveMax describe the
range of the wave elevation; it is non-trivial to calculate this from
the wave models themselves, so it is required as an input.
The base wave superposition class can be selected with "type wave;", but
also selects by default when the "type" entry is omitted, so the change
is backwards compatible.
In order to increase the flexibility of the wave library, the mean flow
handling has been removed from the waveSuperposition class. This makes
waveSuperposition work purely in terms of perturbations to a mean
background flow.
The input has also been split, with waves now defined as region-wide
settings in constant/waveProperties. The mean flow parameters are sill
defined by the boundary conditions.
The new format of the velocity boundary is much simpler. Only a mean
flow velocity is required.
In 0/U:
boundaryField
{
inlet
{
type waveVelocity;
UMean (2 0 0);
}
// etc ...
}
Other wave boundary conditions have not changed.
The constant/waveProperties file contains the wave model selections and
the settings to define the associated coordinate system and scaling
functions:
In constant/waveProperties:
origin (0 0 0);
direction (1 0 0);
waves
(
Airy
{
length 300;
amplitude 2.5;
phase 0;
angle 0;
}
);
scale table ((1200 1) (1800 0));
crossScale constant 1;
setWaves has been changed to use a system/setWavesDict file rather than
relying on command-line arguments. It also now requires a mean velocity
to be specified in order to prevent ambiguities associated with multiple
inlet patches. An example is shown below:
In system/setWavesDict:
alpha alpha.water;
U U;
liquid true;
UMean (1 0 0);
This is to make it clear that the value supplied is the scalar mean
velocity normal to the patch, and to distinguish it from other instances
of the keyword "UMean" which take a vector quantity.
The Scaled Function1 removes the need for classes to hold both a value
and a ramping function. If it is desired to ramp up a velocity up to
(10 0 0) over the space of 5 seconds, that can be achieved as follows:
velocity
{
type scale;
scale
{
type halfCosineRamp;
duration 5;
}
value (10 0 0);
}
Also, as a result of this change, the velocityRamping fvOption has
become a general acceleration source, based on a velocity Function1. It
has therefore been renamed accelerationSource.
Class
Foam::dynamicInterpolatedFvMesh
Description
Interpolates pre-specified motion specified as a set of pointVectorFields.
The motion can be provided either as a set of displacement or position
fields and the entry \c displacement specified accordingly.
Usage
Example:
\verbatim
dynamicFvMesh dynamicInterpolatedFvMesh;
displacementLaplacianCoeffs
{
field wantedDisplacement;
displacement yes;
interpolationScheme linear;
}
\endverbatim
This will scan the case for \c wantedDisplacement \c pointVectorFields in
the time directories and interpolate those in time (using \c linear
interpolation) to obtain the current displacement. The advantage of
specifying displacement in this way is that it automatically works in
parallel using \c decomposePar to decompose the set of \c pointVectorFields
provided.