fvPatchFields: Removed all fvPatchFields requiring user specified data from the null-constructor table
This avoids potential hidden run-time errors caused by solvers running with boundary conditions which are not fully specified. Note that "null-constructor" here means the constructor from patch and internal field only, no data is provided. Constraint and simple BCs such as 'calculated', 'zeroGradient' and others which do not require user input to fully specify their operation remain on the null-constructor table for the construction of fields with for example all 'calculated' or all 'zeroGradient' BCs. A special version of the 'inletOutlet' fvPatchField named 'zeroInletOutlet' has been added in which the inlet value is hard-coded to zero which allows this BC to be included on the null-constructor table. This is useful for the 'age' functionObject to avoid the need to provide the 'age' volScalarField at time 0 unless special inlet or outlet BCs are required. Also for isothermalFilm in which the 'alpha' field is created automatically from the 'delta' field if it is not present and can inherit 'zeroInletOutlet' from 'delta' if appropriate. If a specific 'inletValue' is require or other more complex BCs then the 'alpha' field file must be provided to specify these BCs as before. Following this improvement it will now be possible to remove the null-constructors from all fvPatchFields not added to the null-constructor table, which is most of them, thus reducing the amount of code and maintenance overhead and making easier and more obvious to write new fvPatchField types.
This commit is contained in:
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object DR;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 16.61;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object PMV;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 1.40936;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1.40936;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform -1.18438;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1.40936;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,41 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object PPD;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 46.0115;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 46.0115;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 34.4876;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 46.0115;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user