Standardized the selection of required and optional fields in BCs, fvOptions, functionObjects etc.
In most boundary conditions, fvOptions etc. required and optional fields
to be looked-up from the objectRegistry are selected by setting the
keyword corresponding to the standard field name in the BC etc. to the
appropriate name in the objectRegistry. Usually a default is provided
with sets the field name to the keyword name, e.g. in the
totalPressureFvPatchScalarField the velocity is selected by setting the
keyword 'U' to the appropriate name which defaults to 'U':
Property | Description | Required | Default value
U | velocity field name | no | U
phi | flux field name | no | phi
.
.
.
However, in some BCs and functionObjects and many fvOptions another
convention is used in which the field name keyword is appended by 'Name'
e.g.
Property | Description | Required | Default value
pName | pressure field name | no | p
UName | velocity field name | no | U
This difference in convention is unnecessary and confusing, hinders code
and dictionary reuse and complicates code maintenance. In this commit
the appended 'Name' is removed from the field selection keywords
standardizing OpenFOAM on the first convention above.
This commit is contained in:
@ -39,8 +39,6 @@ boundaryField
|
||||
{
|
||||
type totalPressure;
|
||||
p0 $internalField;
|
||||
U U;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi none;
|
||||
gamma 1;
|
||||
|
||||
@ -18,9 +18,7 @@ forces
|
||||
log yes;
|
||||
|
||||
patches ( "propeller.*" );
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf; // Indicates incompressible
|
||||
rho rhoInf; // Indicates incompressible
|
||||
log true;
|
||||
rhoInf 1; // Redundant for incompressible
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ sixDoFRigidBodyMotionCoeffs
|
||||
);
|
||||
angularMomentum (0 0 -2);
|
||||
g (0 -9.81 0);
|
||||
rhoName rhoInf;
|
||||
rho rhoInf;
|
||||
rhoInf 1;
|
||||
report on;
|
||||
|
||||
|
||||
@ -51,12 +51,10 @@ functions
|
||||
{
|
||||
type forces;
|
||||
libs ( "libforces.so" );
|
||||
writeControl timeStep;
|
||||
writeInterval 10;
|
||||
writeControl timeStep;
|
||||
writeInterval 10;
|
||||
patches (wing);
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf;
|
||||
rho rhoInf;
|
||||
log true;
|
||||
rhoInf 1;
|
||||
CofR (0.4974612746 -0.01671895744 0.125);
|
||||
|
||||
@ -29,8 +29,6 @@ boundaryField
|
||||
(1 40)
|
||||
);
|
||||
p0 40; // only used for restarts
|
||||
U U;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi none;
|
||||
gamma 1;
|
||||
|
||||
@ -25,8 +25,6 @@ boundaryField
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.01;
|
||||
phi phi;
|
||||
k k;
|
||||
value uniform 200;
|
||||
}
|
||||
outlet1
|
||||
|
||||
@ -24,7 +24,7 @@ momentumSource
|
||||
{
|
||||
selectionMode all;
|
||||
|
||||
fieldNames (U);
|
||||
fields (U);
|
||||
Ubar (0.1335 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,6 @@ functions
|
||||
type streamLine;
|
||||
writeControl writeTime;
|
||||
setFormat vtk;
|
||||
UName U;
|
||||
trackForward true;
|
||||
fields (p U);
|
||||
lifeTime 10000;
|
||||
@ -100,9 +99,7 @@ functions
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
patches ( "motorBike.*" );
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf;
|
||||
rho rhoInf;
|
||||
log true;
|
||||
rhoInf 1;
|
||||
liftDir (0 0 1);
|
||||
|
||||
@ -14,9 +14,7 @@ forces
|
||||
writeInterval 1;
|
||||
|
||||
patches ( "motorBike.*" );
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf; // Indicates incompressible
|
||||
rho rhoInf; // Indicates incompressible
|
||||
log true;
|
||||
rhoInf 1; // Redundant for incompressible
|
||||
liftDir (0 0 1);
|
||||
|
||||
@ -16,9 +16,6 @@ streamLines
|
||||
|
||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
||||
|
||||
// Velocity field to use for tracking.
|
||||
UName U;
|
||||
|
||||
// Tracked forwards (+U) or backwards (-U)
|
||||
trackForward true;
|
||||
|
||||
|
||||
@ -17,8 +17,8 @@ forceCoeffs1
|
||||
|
||||
log yes;
|
||||
|
||||
patches ( motorBikeGroup );
|
||||
rhoName rhoInf; // Indicates incompressible
|
||||
patches (motorBikeGroup);
|
||||
rho rhoInf; // Indicates incompressible
|
||||
rhoInf 1; // Redundant for incompressible
|
||||
liftDir (0 0 1);
|
||||
dragDir (1 0 0);
|
||||
@ -27,14 +27,14 @@ forceCoeffs1
|
||||
magUInf 20;
|
||||
lRef 1.42; // Wheelbase length
|
||||
Aref 0.75; // Estimated
|
||||
/*
|
||||
/*
|
||||
binData
|
||||
{
|
||||
nBin 20; // output data into 20 bins
|
||||
direction (1 0 0); // bin direction
|
||||
cumulative yes;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -19,9 +19,6 @@ streamLines
|
||||
|
||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
|
||||
|
||||
// Velocity field to use for tracking.
|
||||
UName U;
|
||||
|
||||
// Tracked forwards (+U) or backwards (-U)
|
||||
trackForward true;
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ wallBoundedStreamLines
|
||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
|
||||
|
||||
// Velocity field to use for tracking.
|
||||
UName UNear;
|
||||
U UNear;
|
||||
|
||||
// Interpolation method. Default is cellPoint. See sampleDict.
|
||||
//interpolationScheme pointMVC;
|
||||
|
||||
@ -60,9 +60,6 @@ functions
|
||||
|
||||
setFormat vtk; //gnuplot;//xmgr;//raw;//jplot;//csv;//ensight;
|
||||
|
||||
// Velocity field to use for tracking.
|
||||
UName U;
|
||||
|
||||
// Tracked forwards (+U) or backwards (-U)
|
||||
trackForward true;
|
||||
|
||||
|
||||
@ -60,9 +60,6 @@ functions
|
||||
|
||||
setFormat vtk; //gnuplot;//xmgr;//raw;//jplot;//csv;//ensight;
|
||||
|
||||
// Velocity field to use for tracking.
|
||||
UName U;
|
||||
|
||||
// Tracked forwards (+U) or backwards (-U)
|
||||
trackForward true;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ disk
|
||||
selectionMode cellZone;
|
||||
cellZone rotatingZone;
|
||||
|
||||
fieldNames (U); // Names of fields on which to apply source
|
||||
fields (U); // Names of fields on which to apply source
|
||||
nBlades 3; // Number of blades
|
||||
tipEffect 0.96; // Normalised radius above which lift = 0
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ disk1
|
||||
|
||||
actuationDiskSourceCoeffs
|
||||
{
|
||||
fieldNames (U);
|
||||
fields (U);
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet actuationDisk1;
|
||||
@ -41,7 +41,7 @@ disk2
|
||||
|
||||
actuationDiskSourceCoeffs
|
||||
{
|
||||
fieldNames (U);
|
||||
fields (U);
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet actuationDisk2;
|
||||
|
||||
Reference in New Issue
Block a user