Commit Graph

7543 Commits

Author SHA1 Message Date
8bd14164ad utilities removeFaces and createEngineZones: Replaced Pout with Info 2024-04-18 08:27:49 +01:00
3bd79f0447 bash_completion: Added reorderPatches 2024-04-17 17:38:33 +01:00
161710acd1 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-04-17 17:38:26 +01:00
6e754fd650 extrudeToRegionMesh: moved setting the mesh instance to after the deletion of empty patches 2024-04-17 17:37:42 +01:00
b85aebb250 dimensionSet: Remove #include dependence on Field 2024-04-17 16:22:38 +01:00
347cf0e9e2 GeometricVectorField: Added normalised and perpendicular unary functions 2024-04-17 16:22:38 +01:00
4707bc917e reorderPatches: New utility to reorder patches
corresponding to a give order, another case or another region.

Description
    Utility to reorder the patches of a case

    The new patch order may be specified directly as a list of patch names
    following the -patchOrder option or from the boundary file of a reference
    case specified using the -referenceCase option with or without the
    -referenceRegion option.

    This utility run either serial or parallel but either way the reference
    case boundary file is read from the constant directory.

Usage
    \b reorderPatches

    Options:
      - \par -patchOrder \<patch names\>
        Specify the list of patch names in the new order.

      - \par -referenceCase \<case path\>
        Specify the reference case path

      - \par -referenceRegion \<name\>
        Specify an alternative mesh region for the reference case.
        If -referenceCase is not specified the current case is used.

      - \par -overwrite \n
        Replace the old mesh with the new one, rather than writing the new one
        into a separate time directory

      - \par -region \<name\>
        Specify an alternative mesh region.
2024-04-17 16:15:10 +01:00
441d7f1243 snappyHexMesh::meshRefinement: Correct mesh instance for overwrite
Must be done just before write to correct the instance in case it has changed
due to call to reorderPatches to remove zero-sized patches.
2024-04-17 15:16:12 +01:00
86a9c41c21 tutorials: Removed redundant fluxRequired entries 2024-04-17 15:15:38 +01:00
261d2aac60 randomGenerator: Added functions to return fields of samples 2024-04-17 09:39:40 +01:00
f582eff8a7 patchIntersection, nonConformalMappedPolyFacesFvsPatchLabelField: Fixes for 64-bit labels 2024-04-16 16:14:56 +01:00
08870e4560 PhysicalPropertiesThermo, mirrorMesh, renumberMesh: Clang compilation fixes 2024-04-16 16:14:56 +01:00
d5880573c2 randomGenerator: Added IO
This means that, if it is deemed necessary, a sub-model can save the
state of its random generator and then recover that state on restart.
2024-04-16 16:14:56 +01:00
ad9bfa4c3c token: Added support for reading and writing integers of specific sizes 2024-04-16 16:14:56 +01:00
d34d9b93cc distributions::standardNormal: Added to replace functions in randomGenerator 2024-04-16 16:14:56 +01:00
1d05b224cb randomGenerator: Renamed Random 2024-04-16 16:14:56 +01:00
f0c63237aa multiphaseEuler: Corrected printing of interface names 2024-04-16 16:14:56 +01:00
30a25219d7 polyMesh::reorderPatches: Update time instance for the mesh
so that the mesh with the changed boundary is written into a new time directory
if time has changed.
2024-04-16 15:11:14 +01:00
615d72a17d PtrListDictionary::set: Remove key from hash table if the pointer is null 2024-04-16 12:17:02 +01:00
e5f48bfca6 functionObjects: Added single patch option to functionObjects that operate on patches
functionObjects layerAverage, nearWallFields, wallHeatFlux, wallHeatTransferCoeff,
wallShearStress and forcesBase now support both the 'patches' option for which a
list of regular expressions to select the patches is specified and the new simple
'patch' option for which a single patch name is specified.
2024-04-15 14:18:50 +01:00
95cb22b8bf multiphaseEuler::cellPressureCorrector: Removed redundant code 2024-04-15 09:50:27 +01:00
dfb816c511 foamPostProcess: Load the modular solver library before constructing the mesh
to ensure all the solver specific patch types are available when the mesh is
constructed.
2024-04-13 09:44:01 +01:00
5a9681c693 mappedPatchBaseBase: Added actual patch type to diagnostic message 2024-04-13 09:43:27 +01:00
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