Commit Graph

27 Commits

Author SHA1 Message Date
Mark Olesen
252326df05 STYLE: add fa/fv namespace qualifiers for fa/fv option 2021-06-29 13:43:44 +02:00
Mark Olesen
2f6739b140 ENH: protected method fa/fv option::resetApplied()
- resizes to current fieldNames_ size and assigns everything to
  false to avoid any "stickiness" if the field ordering changes
  between reads.

ENH: additional debugging faOption/fvOption (#2110)

- aids tracing which sources are being used/ignored
- update code style

STYLE: rename CodedSource -> CodedFvSource

- avoid future name clashes with CodedFaSource
2021-06-07 09:47:54 +02:00
Mark Olesen
0a5a0c29d7 ENH: lazier demand-driven evaluation in faOption
STYLE: namespace qualifiers on fa/fv option
2021-05-27 21:04:55 +02:00
Kutalmis Bercin
5de23079ea DOC: fvOptions: improve header documentation
STYLE: use auto/tmp wherever possible
  ENH: make destructor/deleted constructors consistent with FOs
2020-12-08 16:49:17 +00:00
Mark Olesen
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Andrew Heather
d1bc53b77e ENH: Updated construction/retrieval of gravity field. See #1094 2018-11-14 21:49:32 +00:00
Mark Olesen
e7c1d46904 ENH: avoid raw dictionary lookup in fvOptions (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
sergio
4cb073e150 ENH: Up to date icoReactingMultiphaseInterFoam solver and libs
Adding tutorials and other minor changes
2018-06-04 11:25:59 -07:00
Mark Olesen
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
Henry Weller
8b55ea4fb1 fvOptions: The "<type>Coeffs" sub-dictionary is now optional
For example the actuationDiskSource fvOption may now be specified

disk1
{
    type            actuationDiskSource;

    fields      (U);

    selectionMode   cellSet;
    cellSet         actuationDisk1;
    diskDir         (1 0 0);    // Orientation of the disk
    Cp              0.386;
    Ct              0.58;
    diskArea        40;
    upstreamPoint   (581849 4785810 1065);
}

rather than

disk1
{
    type            actuationDiskSource;
    active          on;

    actuationDiskSourceCoeffs
    {
        fields      (U);

        selectionMode   cellSet;
        cellSet         actuationDisk1;
        diskDir         (1 0 0);    // Orientation of the disk
        Cp              0.386;
        Ct              0.58;
        diskArea        40;
        upstreamPoint   (581849 4785810 1065);
    }
}

but this form is supported for backward compatibility.
2017-04-13 13:30:17 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
b23b137ff8 fvOptions::tabulatedAccelerationSource: Minor update to doc 2016-07-06 10:16:57 +01:00
Henry Weller
71fdcab771 Updated header documentation processed by Doxygen 2016-06-19 21:23:54 +01:00
Andrew Heather
d31adaeb5e ENH: (further) Doxygen documentation updates for module support 2016-06-17 17:41:04 +01:00
Henry Weller
b3f3562d3c Doxygen documentation: Use the standard 'Usage' rather than the '\heading....' 2016-06-17 17:22:24 +01:00
Henry Weller
3eec5854be 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.
2016-05-21 20:28:20 +01:00
Henry Weller
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +01:00
Henry Weller
5779e4fd16 Info -> InfoInFunction and updated comments 2016-01-20 16:21:37 +00:00
Henry Weller
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
Henry Weller
c4d5f65a10 Completed update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-11 09:03:39 +00:00
Henry
bbbad9cfc0 fvOptions: Rationalize naming convention for constraints 2015-06-01 09:58:33 +01:00
Henry
b4a94650c9 fvOption: Rationalize read to support re-reading
writeData is not yet completely consistent with read.
2015-05-31 17:14:32 +01:00
Henry
3a004fda10 fvOptions: Separate options for all cells, cellSets and inter-region coupling
by introducing rational base-classes rather than using the hideous
'switch' statement.  Further rationalization of the cell-selection
mechanism will be implemented via an appropriate class hierarchy to
replace the remaining 'switch' statement.

Mesh-motion is currently handled very inefficiently for cellSets and not
at all for inter-region coupling.  The former will be improved when the
cell-selection classes are written and the latter by making the
meshToMesh class a MeshObject after it has been corrected for mapFields.
2015-05-31 16:38:01 +01:00
Henry
776e82f34b tabulatedAccelerationSource: New fvOption to support 6-DoF solid-body motion
Example usage:

SBM
{
    type            tabulatedAccelerationSource;
    active          true;
    selectionMode   all;

    tabulatedAccelerationSourceCoeffs
    {
        timeDataFileName "constant/acceleration.dat";
    }
}

Where the file constant/acceleration.dat contains a list of tuples
containing time and a vector of the linear acceleration, angular
velocity and angular acceleration e.g.

100
(
(0 ((0 0 0) (0 0 0) (0 0 0)))
(0.001 ((-0.0001 0 4e-05) (5e-5 -0.0002 -3e-8) (0.24 -0.8 -1e-4)))
.
.
.
)
2015-05-28 15:25:22 +01:00