Commit Graph

7520 Commits

Author SHA1 Message Date
a4929ccbbc polyMesh: Updated searching for boundary, cells, cellZones, faceZones and pointZones files
These files are now searched for starting at the current time and back in time
to constant but stopping at the most recent polyMesh directory containing faces,
i.e. the most recent topological specification of the mesh.  Zones which cannot
be found are set empty rather than requiring zone files to be present containing
an empty list.
2024-04-12 13:43:05 +01:00
5ed8fd320c cellZone: Added typedef to access the cellZones type 2024-04-11 13:40:11 +01:00
898cb9b599 functionObjects::wallShearStress: Added support for other types of wall patch, in particular filmWall 2024-04-11 13:39:17 +01:00
d02757444e Time::userDeltaTValue(): New member function to return the time-step in user-time units
functionObjects::userTimeStep updated to use Time::userDeltaTValue().
2024-04-10 19:19:48 +01:00
c15bd5914b functionObjects::userTimeStep: New functionObject to write the time-step in user-time units 2024-04-10 14:13:58 +01:00
7752dc4354 Zone: Added helper functions for the creation of zones from geometry 2024-04-10 14:13:05 +01:00
29ac1eede8 remote: Added firstProcOp and firstProcEqOp
This allows a remote location to be synchronised. In this case, it is
synchronised to the first valid process. This choice is abitrary. A
lastProcOp could be implemented similarly, or a more complex criteria
could be used.
2024-04-10 12:25:47 +01:00
f9046e6ec4 ZoneList: Empty ZoneLists are no longer written 2024-04-08 12:50:26 +01:00
47828af6a8 regIOobject::readStream: Changed the class name test to issue a warning rather than a fatal error
This temporary change allows cases with the old incorrect zone file headers to
run without the need to update them, the warning:

--> FOAM Warning :
    From function Foam::Istream& Foam::regIOobject::readStream(const Foam::word&, bool)
    in file db/regIOobject/regIOobjectRead.C at line 169
    Reading ".../tutorials/incompressibleVoF/floatingObject/constant/polyMesh/cellZones" at line 14
    Unexpected class name regIOobject, expected cellZoneList
    while reading object cellZones

is printed rather than the case stopping with a fatal error.
2024-04-08 09:57:19 +01:00
d2817a0ac9 Time: Adjust the precision of the time name if necessary every time-step
This change guarantees that the precision of the time written to the log file,
all functionObject logs and the time directories is sufficient to be unique
irrespective of the change in the time-step or start time of the run.  If the
calculated time precision exceeds what can be represented by the floating point
resolution, e.g. by the time-step dropping to a VERY low value, the run stops.
2024-04-08 09:46:09 +01:00
c11a2415d2 typeInfo: Added dynamicCastNull and refCastNull
These functions dynamic cast a reference to a type, and return a null
object reference if the cast fails. The standard dynamicCast and refCast
functions, by contrast, throw an error if the cast fails.
2024-04-05 14:21:22 +01:00
1c6d785c1c foamFind: script to find files in OpenFOAM and optionally process the contents
by printing their contents or lines which match a search string.

Usage: ${0##*/} [OPTIONS] <filename>
options:
  -a | -applications     search for the file from the \$FOAM_APP directory
  -d | -dir <dir>        specify search directory
  -f | -files            find wmake 'files' file associated with searched file
  -h | -help             help
  -i | -isearch <string> searches files for a <string>, case insensitive
  -m | -modules          search for the file from the \$FOAM_MODULES directory
  -n | -numbers          print line numbers with file output
  -o | -options          find wmake 'options' file associated with searched file
  -p | -print            print the file(s)
  -s | -search <string>  searches files for a <string>, case sensitive
  -t | -tutorials        search for the file from the \$FOAM_TUTORIALS directory

Finds one or more files in OpenFOAM and optionally processes the contents by:
+ printing the file ('-print' option);
+ printing lines within the file matching a search string ('-search' option).

With source code files, can locate the 'files' and 'options' files associated
with their compilation using 'wmake'.

By default, files are searched from the src (\$FOAM_SRC) directory.
Alternatively the '-dir' option allows the user to specify the search directory
The '-applications', '-modules' and '-tutorials' options specifically set the
search path to the \$FOAM_APP, \$FOAM_MODULES and \$FOAM_TUTORIALS directories,
respectively.

Examples:
    foamFind -print wallHeatFlux.C | less
    + click space bar to scroll down
    + enter line number (after ":") to jump to line
    + enter "/text" to search for "text" (or any other string)

    foamFind -applications -isearch "momentumtransport" -options fluid.C
    foamFind -numbers -search laminar BirdCarreau.C
20240405
2024-04-05 13:28:41 +01:00
ed59ea40bf vtkPVFoam: Updated handling of zones 2024-04-05 11:47:49 +01:00
ef3021c55a fvMeshMovers::multiValveEngine: Ensure the scale field is initialised
if travelInterval is not set.
2024-04-05 10:11:02 +01:00
140d8b9aa7 multiValveEngine::movingObject: Removed unused code 2024-04-04 17:17:21 +01:00
1166840924 tutorials/incompressibleVoF/damBreak/system/controlDict: Removed temporary test entry 2024-04-04 13:41:41 +01:00
ea5c2cb496 multiValveEngine: Removed the normalisation of the fractionalTravelInterval
So the user specification is travelInterval rather than
fractionalTravelInterval, and with the dimensions of the distance the object
travels:

        - travelInterval: part of the stroke travelled after
          which the cached motion scaling weights are recalculated

Unfortunately this is a lot less convenient to specify, particularly as it is
now a dimensioned input which may have to be changed if the stroke or valve lift
table are changed but it was felt by the sponsors of the project that the
automatic method to evaluate the valve lift from the Function1 was not
sufficiently robust.
2024-04-04 13:33:41 +01:00
a1d6d552a3 physicalProperties: Generalise usage
This class is no longer pure virtual, and can be constructed for any
object registry. This means it can be used as a generic physical
properties dictionary, as well as being derived into more specific
contexts (i.e., finite-volume viscosity and thermodynamic models).
2024-04-04 11:23:30 +01:00
3733a772f3 faceZone: Updated reset using the new HashTable::sorted function 2024-04-04 00:01:26 +01:00
985ec93636 dragModels::segregated: Corrected the muAlphaI expression
Corrected according to the original reference:
    Marschall, H. (2011).
    Towards the numerical simulation of multi-scale two-phase flows.
    PhD Thesis, TU München.
2024-04-03 17:33:58 +01:00
7317e0db63 ZoneList: Updated zone type name for reading 2024-04-03 16:01:02 +01:00
7f5c1120bc timeControlFunctionObject: Changed startTime and endTime to be input as user-time 2024-04-03 15:42:23 +01:00
afc5c00104 IOPosition: Extended to use with primitive lists of particles 2024-04-03 15:14:45 +01:00
d02f516426 DynamicField: Added "reuse" and dictionary constructors 2024-04-03 15:14:45 +01:00
5e74e289a5 SubField: Added "reuse" constructor
This doesn't add any functionality, but it is necessary to unify the
interface with Field for classes that are templated on their container
2024-04-03 15:14:45 +01:00
921c9719ee OldTimeField: Abstract old-time functionality
The old-time field implementation has been removed from GeometricField
and put in a separate base class. This class is now used as a base of
both GeometricField and DimensionedField, thereby adding oldTime
functionality to the latter.

Care has been taken to ensure that a GeometricField never duplicates the
old-time field by storing it in both the GeometricField and
DimensionedField classes. When a GeometricField creates an old-time
field it pushes the reference down into the DimensionedField so that the
latter does not then create its own copy of the old-times.
2024-04-03 15:14:45 +01:00
24a3bfdd17 DimensionedField, GeometricField: Consistent field-access interface 2024-04-03 15:14:45 +01:00
5039aec60d objectRegistry: Added printToc() function to print the object names and their types
The writeObjects functionObject has been updated to use printToc() when an
object cannot be found and now for the incompressibleFluid/pitzDailySteady case
it prints:

--> FOAM Warning : writeObjects: object hmm not found in database. Available objects:
    Cc                                      volVectorField
    Cf                                      surfaceVectorField
    GAMGAgglomeration                       faceAreaPair
    MRFProperties                           dictionary
    Residuals<scalar>                       Residuals<scalar>
    Residuals<sphericalTensor>              Residuals<sphericalTensor>
    Residuals<symmTensor>                   Residuals<symmTensor>
    Residuals<tensor>                       Residuals<tensor>
    Residuals<vector>                       Residuals<vector>
    Sf                                      surfaceVectorField
    U                                       volVectorField
    Vc                                      volScalarField::Internal
    boundary                                polyBoundaryMesh
    cellZones                               cellZoneList
    epsilon                                 volScalarField
    faceZones                               faceZoneList
    faces                                   faceCompactList
    fvConstraints                           fvConstraints
    fvModels                                fvModels
    fvSchemes                               dictionary
    fvSolution                              dictionary
    k                                       volScalarField
    kEpsilon:G                              volScalarField::Internal
    magSf                                   surfaceScalarField
    momentumTransport                       kEpsilon
    nearWallDist                            nearWallDist
    neighbour                               labelList
    nu                                      volScalarField
    nut                                     volScalarField
    owner                                   labelList
    p                                       volScalarField
    phi                                     surfaceScalarField
    physicalProperties                      constant
    pointConstraints                        pointConstraints
    pointMesh                               pointMesh
    pointZones                              pointZoneList
    points                                  vectorField
    solutionControl                         pimpleNoLoopControl
    solver                                  incompressibleFluid
    tetBasePtIs                             labelList
    volPointInterpolate(U)                  pointVectorField
    volPointInterpolate(k)                  pointScalarField
    volPointInterpolate(p)                  pointScalarField
    volPointInterpolation                   volPointInterpolation
2024-04-03 14:12:40 +01:00
e2ebafd368 objectRegistry: Standardised table of contents function names
Renamed names and sortedNames functions to toc and sortedToc for consistency
with HashTable and all derived containers allowing reuse of the HashTable
functions.
2024-04-03 11:53:48 +01:00
bfda07b7ed polyMesh: Added zone construction order comments 2024-04-02 21:11:21 +01:00
ab4b177af1 polyMesh: Delay reading the zones files until after the mesh geometry is constructed
this allows the zones constructors which generate the cell, face or point
indices at run-time to use mesh geometry.
2024-04-02 20:30:12 +01:00
00afbd2f80 snappyHexMesh::meshRefinement: Removed check for overlapping faceZones
Now that overlapping faceZones are valid, i.e. any number of faces can be
present in any number of faceZones, this is no longer considered an error.
2024-04-02 19:57:33 +01:00
7ce9e73c4b ZoneList: Removed unnecessary constructors 2024-04-02 19:57:01 +01:00
929952727c Renamed cellZones -> cellZoneList, faceZones -> faceZoneList, pointZones -> pointZoneList
to allow the names cellZones, faceZones and pointZones to be used for the
namespaces for run-time selectable zones.
2024-04-02 17:00:51 +01:00
acd2708db5 renumberMesh: Corrected renumbering of zones 2024-03-28 20:27:17 +00:00
3123551bfa Zones: Now derived from PtrListDictionary to provide faster lookup
Now the HashTable underlying PtrListDictionary is used for zone lookup by name
which is a lot faster than the linear search method used previously if there are
a large number of zones.
2024-03-28 20:25:29 +00:00
4ad52ea108 zones: General code clean-up and rationalisation to reduce duplication 2024-03-27 13:29:44 +00:00
fa36bc75cc faceZones: New class to replace the original typedef
The faceZone specific functionality from Zones moved to the faceZones class.
2024-03-26 22:42:36 +00:00
5292cbdb5b Zone: Moved generic functionality from derived zone types into Zone 2024-03-26 18:40:56 +00:00
df6d3bf9d2 Renamed meshCellZones -> cellZones, meshFaceZones -> faceZones and meshPointZones -> pointZones
The prefix "mesh" was confusing and obviously relevant or helpful in
understanding the purpose or operation of these zone container classes.
20240326
2024-03-26 14:52:16 +00:00
339e20c0f8 zones: Renamed meshZones() -> zones() 2024-03-26 13:30:21 +00:00
98cd7a85af Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-03-26 12:27:31 +00:00
ca2cae8c38 Zone: New templated replacement for zone
This allows more functionality from the cellZone, faceZone and pointZone derived
classes to be moved into the base class.
2024-03-26 12:25:42 +00:00
49b0069df0 fvModels: Fix hang due to non-synchronised diagonal construction
Resolves bug report https://bugs.openfoam.org/view.php?id=4066
2024-03-26 12:18:42 +00:00
a833a81560 polyTopoChange: Removed restrictive faceZone functionality
Now faceZones are handled directly by the applications and the new
faceZone::topoChange function so that any face can now be in any number of
zones, significantly increasing the flexibility and usefulness of faceZones.

This completes the generalisation of cellZone, faceZone and pointZone to support
multiple zones for each cell, face or point respectively.  Next step will be to
make zones polymorphic and run-time selectable so that they can alter during the
run and adapt to moving meshes for example.
2024-03-25 14:32:59 +00:00
7c86fc69bb hConstThermo, eConstThermo: Improved documentation 2024-03-25 10:11:46 +00:00
ad015dffda polyTopoChange: Standardised the naming of the modifyFace functions 2024-03-21 22:00:06 +00:00
09c8263d08 faceZone: Added new insert function to add elements from a Map<bool>
//- Insert given indices and corresponding face flips into zone
        void insert(const Map<bool>& newIndices);
2024-03-21 16:32:42 +00:00
d77d4a0e29 addPatchCellLayer::setRefinement: Corrected handing of multi-zone extrusion 2024-03-20 12:12:24 +00:00
4854277915 snappyLayerDriver: Updated for changes to polyTopoChange::addPatchCellLayer 2024-03-19 15:15:44 +00:00