sita |
October 10, 2019 09:12 |
Inconsistent behaviour of function object "scale"
Hi all,
I've been using velocity ramping to start my OF7 interFoam simulations for a while now, without too much trouble so far. However, in my most recent simulation, OpenFOAM suddenly no longer recognises the keyword "duration" in the "scale" entry in 0/U and fvOptions:
Code:
[0] --> FOAM FATAL IO ERROR:
[0] Illegal dictionary entry or environment variable name "duration"
Valid dictionary entries are
2
(
type
start
)
The strangest thing is that, when I go back to one of my previous cases and re-run it, they all still run without complaint. I'm fairly sure that there aren't any differences in how I defined the velocity ramp in my current case (in fact I foamClone'd it from one of the previous cases). The only difference I can think of is that, in this problematic case, I'm using a mesh created by SnappyHexMesh, while in all the other cases I used meshes imported from an external mesher. But I can't see how that would influence OF's behaviour regarding scale functionObjects.
Can anyone help me with this?
Many thanks,
Sita
P.S. For sake of completeness, I've also included the contents of my 0/U and fvOptions files below
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "../constant/refValues";
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
inlet
{
type uniformFixedValue;
value $internalField;
uniformValue
{
value (#neg $Uref 0 0);
type scale;
scale
{
type quarterSineRamp;
start 0;
duration $duration;
}
}
}
outlet
{
type outletPhaseMeanVelocity;
alpha alpha.water;
value $internalField;
UnMean
{
value $Uref;
type scale;
scale
{
type quarterSineRamp;
start 0;
duration $duration;
}
}
}
bottom
{
type symmetryPlane;
}
side
{
type symmetryPlane;
}
midPlane
{
type symmetryPlane;
}
hull
{
type movingWallVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "refValues";
limitU
{
type limitVelocity;
active yes;
selectionMode all;
max 50;
duration 1000000.0;
}
velocityRamping
{
type accelerationSource;
active on;
selectionMode all;
U U;
velocity
{
type scale;
scale
{
type quarterSineRamp;
start 0;
duration $duration;
}
value (#neg $Uref 0 0);
}
}
|