- May 29, 2018
-
-
- May 28, 2018
-
-
Mark OLESEN authored
- consistency with make and more succinct. - reduce code duplication in findEtcFiles.
-
- Apr 24, 2018
-
-
Mark OLESEN authored
- generalize some of the library extensions (.so vs .dylib). Provide as wmake 'sysFunctions' - added note about unsupported/incomplete system support - centralize detection of ThirdParty packages into wmake/ subdirectory by providing a series of scripts in the spirit of GNU autoconfig. For example, have_boost, have_readline, have_scotch, ... Each of the `have_<package>` scripts will generally provide the following type of functions: have_<package> # detection no_<package> # reset echo_<package> # echoing and the following type of variables: HAVE_<package> # unset or 'true' <package>_ARCH_PATH # root for <package> <package>_INC_DIR # include directory for <package> <package>_LIB_DIR # library directory for <package> This simplifies the calling scripts: if have_metis then wmake metisDecomp fi As well as reducing clutter in the corresponding Make/options: EXE_INC = \ -I$(METIS_INC_DIR) \ -I../decompositionMethods/lnInclude LIB_LIBS = \ -L$(METIS_LIB_DIR) -lmetis Any additional modifications (platform-specific or for an external build system) can now be made centrally.
-
- Mar 28, 2018
-
-
Andrew Heather authored
-
- Mar 16, 2018
-
-
Mark OLESEN authored
- when constructing dimensioned fields that are to be zero-initialized, it is preferrable to use a form such as dimensionedScalar(dims, Zero) dimensionedVector(dims, Zero) rather than dimensionedScalar("0", dims, 0) dimensionedVector("zero", dims, vector::zero) This reduces clutter and also avoids any suggestion that the name of the dimensioned quantity has any influence on the field's name. An even shorter version is possible. Eg, dimensionedScalar(dims) but reduces the clarity of meaning. - NB: UniformDimensionedField is an exception to these style changes since it does use the name of the dimensioned type (instead of the regIOobject).
-
- Feb 22, 2018
-
-
Mark OLESEN authored
- the wordHashSet typedef is always available when HashSet has been included. - use default HashTable key (word) instead of explicitly mentioning it
-
- Feb 14, 2018
-
-
mattijs authored
-
- Feb 08, 2018
-
-
Mark OLESEN authored
- add copy construct from UList - remove copy construct from dissimilar types. This templated constructor was too generous in what it accepted. For the special cases where a copy constructor is required with a change in the data type, now use the createList factory method, which accepts a unary operator. Eg, auto scalars = scalarList::createList ( labels, [](const label& val){ return 1.5*val; } );
-
- Jan 08, 2018
-
-
Mark OLESEN authored
- use succincter method names that more closely resemble dictionary and HashTable method names. This improves method name consistency between classes and also requires less typing effort: args.found(optName) vs. args.optionFound(optName) args.readIfPresent(..) vs. args.optionReadIfPresent(..) ... args.opt<scalar>(optName) vs. args.optionRead<scalar>(optName) args.read<scalar>(index) vs. args.argRead<scalar>(index) - the older method names forms have been retained for code compatibility, but are now deprecated
-
- Dec 08, 2017
-
-
Mark OLESEN authored
- list all regions from constant/regionProperties: * foamListRegions - list specific region type from constant/regionProperties: * foamListRegions fluid * foamListRegions solid
-
- Nov 13, 2017
-
-
mattijs authored
-
- Nov 26, 2017
-
-
Mark OLESEN authored
-
- Nov 22, 2017
-
-
Mark OLESEN authored
-
- Sep 22, 2017
-
-
Mark OLESEN authored
-
- Oct 24, 2017
-
-
Mark OLESEN authored
-
- Jul 22, 2017
-
-
Mark OLESEN authored
-
Mark OLESEN authored
-
- Jul 20, 2017
-
-
Mark OLESEN authored
- the 'protect' inputMode is used to supply defaults. If an entry already exists, it should act as a no-op without any side-effects whatsoever.
-
- Jul 19, 2017
-
-
mattijs authored
-
- Sep 13, 2017
-
-
Andrew Heather authored
old "positions" file form The change to barycentric-based tracking changed the contents of the cloud "positions" file to a new format comprising the barycentric co-ordinates and other cell position-based info. This broke backwards compatibility, providing no option to restart old cases (v1706 and earlier), and caused difficulties for dependent code, e.g. for post-processing utilities that could only infer the contents only after reading. The barycentric position info is now written to a file called "coordinates" with provision to restart old cases for which only the "positions" file is available. Related utilities, e.g. for parallel running and data conversion have been updated to be able to support both file types. To write the "positions" file by default, use set the following option in the InfoSwitches section of the controlDict: writeLagrangianPositions 1;
-
- Sep 08, 2017
-
-
Andrew Heather authored
-
- Jul 13, 2017
-
-
Mark OLESEN authored
- convenience -diffEtc option that behaves like -diff, but invokes foamEtcFile searching STYLE: modernize code.
-
- Jul 03, 2017
-
-
Mark OLESEN authored
-
- May 19, 2017
-
-
Andrew Heather authored
-
- Sep 07, 2017
-
-
Andrew Heather authored
-
- Sep 06, 2017
-
-
Andrew Heather authored
-
- Jul 07, 2017
-
-
Andrew Heather authored
Original commit message: ------------------------ Parallel IO: New collated file format When an OpenFOAM simulation runs in parallel, the data for decomposed fields and mesh(es) has historically been stored in multiple files within separate directories for each processor. Processor directories are named 'processorN', where N is the processor number. This commit introduces an alternative "collated" file format where the data for each decomposed field (and mesh) is collated into a single file, which is written and read on the master processor. The files are stored in a single directory named 'processors'. The new format produces significantly fewer files - one per field, instead of N per field. For large parallel cases, this avoids the restriction on the number of open files imposed by the operating system limits. The file writing can be threaded allowing the simulation to continue running while the data is being written to file. NFS (Network File System) is not needed when using the the collated format and additionally, there is an option to run without NFS with the original uncollated approach, known as "masterUncollated". The controls for the file handling are in the OptimisationSwitches of etc/controlDict: OptimisationSwitches { ... //- Parallel IO file handler // uncollated (default), collated or masterUncollated fileHandler uncollated; //- collated: thread buffer size for queued file writes. // If set to 0 or not sufficient for the file size threading is not used. // Default: 2e9 maxThreadFileBufferSize 2e9; //- masterUncollated: non-blocking buffer size. // If the file exceeds this buffer size scheduled transfer is used. // Default: 2e9 maxMasterFileBufferSize 2e9; } When using the collated file handling, memory is allocated for the data in the thread. maxThreadFileBufferSize sets the maximum size of memory in bytes that is allocated. If the data exceeds this size, the write does not use threading. When using the masterUncollated file handling, non-blocking MPI communication requires a sufficiently large memory buffer on the master node. maxMasterFileBufferSize sets the maximum size in bytes of the buffer. If the data exceeds this size, the system uses scheduled communication. The installation defaults for the fileHandler choice, maxThreadFileBufferSize and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within the case controlDict file, like other parameters. Additionally the fileHandler can be set by: - the "-fileHandler" command line argument; - a FOAM_FILEHANDLER environment variable. A foamFormatConvert utility allows users to convert files between the collated and uncollated formats, e.g. mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated An example case demonstrating the file handling methods is provided in: $FOAM_TUTORIALS/IO/fileHandling The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
-
- Jun 10, 2017
-
-
Provides better context for the available boundary conditions, fvOptions, functionObjects etc. and thus returns only those available to and compatible with the particular application. e.g. pimpleFoam -help Usage: pimpleFoam [OPTIONS] options: -case <dir> specify alternate case directory, default is the cwd -listFunctionObjects List functionObjects -listFvOptions List fvOptions -listRegisteredSwitches List switches registered for run-time modification -listScalarBCs List scalar field boundary conditions (fvPatchField<scalar>) -listSwitches List switches declared in libraries but not set in etc/controlDict -listTurbulenceModels List turbulenceModels -listUnsetSwitches List switches declared in libraries but not set in etc/controlDict -listVectorBCs List vector field boundary conditions (fvPatchField<vector>) -noFunctionObjects do not execute functionObjects -parallel run in parallel -postProcess Execute functionObjects only -roots <(dir1 .. dirN)> slave root directories for distributed running -srcDoc display source code in browser -doc display application documentation in browser -help print the usage pimpleFoam listTurbulenceModels pimpleFoam -listTurbulenceModels /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : dev-39c46019e44f Exec : pimpleFoam -listTurbulenceModels Date : Jun 10 2017 Time : 21:37:49 Host : "dm" PID : 675 Case : /home/dm2/henry/OpenFOAM/OpenFOAM-dev nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). SetNaN : Initialising allocated memory to NaN (FOAM_SETNAN). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Turbulence models 3 ( LES RAS laminar ) RAS models 18 ( LRR LamBremhorstKE LaunderSharmaKE LienCubicKE LienLeschziner RNGkEpsilon SSG ShihQuadraticKE SpalartAllmaras kEpsilon kOmega kOmegaSST kOmegaSSTLM kOmegaSSTSAS kkLOmega qZeta realizableKE v2f ) LES models 10 ( DeardorffDiffStress Smagorinsky SpalartAllmarasDDES SpalartAllmarasDES SpalartAllmarasIDDES WALE dynamicKEqn dynamicLagrangian kEqn kOmegaSSTDES ) Further work will be needed to support the -listTurbulenceModels option in multiphase solvers.
-
- May 16, 2017
-
-
Mark OLESEN authored
- ensure that the string-related classes have consistently similar matching methods. Use operator()(const std::string) as an entry point for the match() method, which makes it easier to use for filters and predicates. In some cases this will also permit using a HashSet as a match predicate. regExp ==== - the set method now returns a bool to signal that the requested pattern was compiled. wordRe ==== - have separate constructors with the compilation option (was previously a default parameter). This leaves the single parameter constructor explicit, but the two parameter version is now non-explicit, which makes it easier to use when building lists. - renamed compile-option from REGEX (to REGEXP) for consistency with with the <regex.h>, <regex> header names etc. wordRes ==== - renamed from wordReListMatcher -> wordRes. For reduced typing and since it behaves as an entity only slightly related to its underlying list nature. - Provide old name as typedef and include for code transition. - pass through some list methods into wordRes hashedWordList ==== - hashedWordList[const word& name] now returns a -1 if the name is is not found in the list of indices. That has been a pending change ever since hashedWordList was generalized out of speciesTable (Oct-2010). - add operator()(const word& name) for easy use as a predicate STYLE: adjust parameter names in stringListOps - reflect if the parameter is being used as a primary matcher, or the matcher will be derived from the parameter. For example, (const char* re), which first creates a regExp versus (const regExp& matcher) which is used directly.
-
- Jun 08, 2017
-
-
Andrew Heather authored
-
Andrew Heather authored
-
- May 18, 2017
-
-
- simplifies organization, includes, linkage etc.
-
- Apr 21, 2017
-
-
Henry Weller authored
-
- Apr 19, 2017
-
-
Mark Olesen authored
- use InfoSwitch to disable, or via static method. - respect the state of the argList banner when deciding to emit initialization information. Can otherwise end up with unwanted output rubbish on things like foamDictionary and foamListTimes.
-
- Apr 03, 2017
-
-
Mark Olesen authored
- this implies that jobControl is a user-resource for OpenFOAM. It was previously located under $WM_PROJECT_INST_DIR/jobControl, but few users will have write access there. - an unset FOAM_JOB_DIR variable is treated as "~/.OpenFOAM/jobControl", which can partially reduce environment clutter. - provide argList::noJobInfo() to conveniently suppress job-info on an individual basis for short-running utilities (eg, foamListTimes) to avoid unneeded clutter.
-
- Mar 21, 2017
-
-
Andrew Heather authored
-
- Feb 23, 2017
-
-
Mark Olesen authored
STYLE: improve consistency in Allwclean scripts
-
- Feb 18, 2017
-
-
Henry Weller authored
Description Base-class for thermophysical properties of solids, liquids and gases providing an interface compatible with the templated thermodynamics packages. liquidProperties, solidProperties and thermophysicalFunction libraries have been combined with the new thermophysicalProperties class into a single thermophysicalProperties library to simplify compilation and linkage of models, libraries and applications dependent on these classes.
-
- Feb 17, 2017
-
-
Henry Weller authored
The fundamental properties provided by the specie class hierarchy were mole-based, i.e. provide the properties per mole whereas the fundamental properties provided by the liquidProperties and solidProperties classes are mass-based, i.e. per unit mass. This inconsistency made it impossible to instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV transport solvers on liquidProperties. In order to combine VoF with film and/or Lagrangian models it is essential that the physical propertied of the three representations of the liquid are consistent which means that it is necessary to instantiate the thermodynamics packages on liquidProperties. This requires either liquidProperties to be rewritten mole-based or the specie classes to be rewritten mass-based. Given that most of OpenFOAM solvers operate mass-based (solve for mass-fractions and provide mass-fractions to sub-models it is more consistent and efficient if the low-level thermodynamics is also mass-based. This commit includes all of the changes necessary for all of the thermodynamics in OpenFOAM to operate mass-based and supports the instantiation of thermodynamics packages on liquidProperties. Note that most users, developers and contributors to OpenFOAM will not notice any difference in the operation of the code except that the confusing nMoles 1; entries in the thermophysicalProperties files are no longer needed or used and have been removed in this commet. The only substantial change to the internals is that species thermodynamics are now "mixed" with mass rather than mole fractions. This is more convenient except for defining reaction equilibrium thermodynamics for which the molar rather than mass composition is usually know. The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and equilibriumFlameT utilities in which the species thermodynamics are pre-multiplied by their molecular mass to effectively convert them to mole-basis to simplify the definition of the reaction equilibrium thermodynamics, e.g. in equilibriumCO // Reactants (mole-based) thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W(); // Oxidant (mole-based) thermo O2(thermoData.subDict("O2")); O2 *= O2.W(); thermo N2(thermoData.subDict("N2")); N2 *= N2.W(); // Intermediates (mole-based) thermo H2(thermoData.subDict("H2")); H2 *= H2.W(); // Products (mole-based) thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W(); thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W(); thermo CO(thermoData.subDict("CO")); CO *= CO.W(); // Product dissociation reactions thermo CO2BreakUp ( CO2 == CO + 0.5*O2 ); thermo H2OBreakUp ( H2O == H2 + 0.5*O2 ); Please report any problems with this substantial but necessary rewrite of the thermodynamic at https://bugs.openfoam.org Henry G. Weller CFD Direct Ltd.
-
- Jan 26, 2017
-
-
Henry Weller authored
-