openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2019-12-10T12:10:28Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/300Feature expressions2019-12-10T12:10:28ZMark OLESENFeature expressions### Summary
This branch represents an implementation of what is considered to be the most useful aspects of swak4Foam ([Swiss-Army-Knife for FOAM](https://openfoamwiki.net/index.php/Contrib/swak4Foam)) from Bernhard Gschaider, namely ...### Summary
This branch represents an implementation of what is considered to be the most useful aspects of swak4Foam ([Swiss-Army-Knife for FOAM](https://openfoamwiki.net/index.php/Contrib/swak4Foam)) from Bernhard Gschaider, namely the ability to use text-based expressions instead of coding in C++ for the following cases:
- expression-based boundary conditions (also known as _groovy_ boundary conditions)
- expression-based setFields (also known as _funky_ set fields)
The idea of what we currently term *expressions* was pioneered by
(Bernhard Gschaider) and is now firmly established in `swak4Foam`.
Among other things, expressions attempt to bridge the gap between
using standard, predefined boundary conditions and writing dedicated,
special-purpose ones. Although part of this gap is now covered within
OpenFOAM by using dynamically compiled user coding (eg, coded boundary
conditions), there remains substantial areas where it can be
significantly more convenient to have a series of predefined functions
and expression sytax with some access to base OpenFOAM field
functionality that enables rapid deployment of boundary conditions, or
custom-defined `setFields` without writing code.
A significant portion of `swak4Foam` expressions has been adapted for
direct integration into OpenFOAM. During the integration and rewrite,
we have tried to pare things down to a smaller subset with the aim of
covering 90% or more of the common cases. The remaining cases are left
to be reassessed for extending the *expressions* functionality in the
future, but they also may be better served with other approaches (eg,
with coded conditions) that were not available when `swak4Foam` was
originally conceived.
To the greatest extent possible, the integrated *expressions* have
been designed to avoid name clashes with `swak` so it should remain
possible to use the most recent versions of `swak` without problem.
### Risks
- New functionality, so low chance of regression.
- The scope of the functionality will be revised in the future
### Naming (for `swak4Foam` users)
The following are the *expressions* correspondences to `swak`:
- The `exprFixedValue` and `exprGradient` boundary conditions are
roughly equivalent to the _groovy_ boundary conditions.
- The utilities `setExprFields` and `setExprBoundaryFields` are
roughly equivalent to the _funky_ utilities of similar name.
The naming of the boundary conditions and utilities not only reflects
the slightly different input requirements, but simultaneously seeks to
avoid any potential name-clash with `swak4Foam` in a mixed
environment.
The names for the boundary condition dictionary entries tend be
shorter and slightly different (eg, `valueExpr` vs `valueExpression`)
to serve as a small reminder that the *expressions* syntax is slightly
different than the *groovy* equivalents. It also allows the user to
fashion dictionary entries that are sufficient for **both** boundary
condition variants and quickly toggle between them simply by changing
the boundary condition `type`.v1912Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/35Feature iotweaks2016-05-13T05:52:16ZMark OLESENFeature iotweaksEnhancements for #114 and #115. Tagged as WIP, since there may be some need for discussion/rework prior to merging.Enhancements for #114 and #115. Tagged as WIP, since there may be some need for discussion/rework prior to merging.https://develop.openfoam.com/Development/openfoam/-/merge_requests/178minor improvements in profiling2017-12-01T14:52:57ZMark OLESENminor improvements in profilingissue #648
- include amount of free system memory in profiling, which can give an
indication of when swapping is about to start
- profilingSummary utility to collect profiling from parallel
calculations. Collects prof...issue #648
- include amount of free system memory in profiling, which can give an
indication of when swapping is about to start
- profilingSummary utility to collect profiling from parallel
calculations. Collects profiling information from processor
directories and summarize the time spent and number of calls as (max
avg min) values.Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/43ENH: Adding interCondensingEvaporatingFoam and tutorial2023-12-07T19:01:57ZSergio FerrarisENH: Adding interCondensingEvaporatingFoam and tutorial Solver for 2 incompressible, isothermal immiscible fluids using a VOF
(volume of fluid) phase-fraction based interface capturing approach.
The momentum and other fluid properties are of the "mixture" and a single
momen... Solver for 2 incompressible, isothermal immiscible fluids using a VOF
(volume of fluid) phase-fraction based interface capturing approach.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
Solver:
/applications/solvers/multiphase/interCondensingEvaporatingFoam
Tutorial:
/tutorials/multiphase/interCondensingEvaporatingFoam/condensatingVessel
Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/73BUG: resolve some decomposeParDict problems (issues #60, #265).2016-11-15T09:46:04ZMark OLESENBUG: resolve some decomposeParDict problems (issues #60, #265).- Cleanup/centralize handling of -decomposeParDict by relocating
common code into argList. Ensures that all processes receive
identical information about the -decomposeParDict opton.
- Only use alternative decomposeParDict for s...- Cleanup/centralize handling of -decomposeParDict by relocating
common code into argList. Ensures that all processes receive
identical information about the -decomposeParDict opton.
- Only use alternative decomposeParDict for simpleFoam/motorBike
tutorial so that this will be included in the test loop for snappy.
- Added Mattijs' fix for surfaceRedistributePar.Version v1612AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/128Consistent use of string methods2017-07-21T15:04:37ZMark OLESENConsistent use of string methods- use more standard forms of string access. Eg, substr() instead of the operator()(...) form, or even resize().
- turn off underscore prefixing by default for word::validated()
- new SubStrings container and associated stringOps::split...- use more standard forms of string access. Eg, substr() instead of the operator()(...) form, or even resize().
- turn off underscore prefixing by default for word::validated()
- new SubStrings container and associated stringOps::split operator. This container may also be useful for writing simple parsers.v1712Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/33Merge foundation2016-05-10T13:33:21ZAdminMerge foundationIntegrating latest code from the OF Foundation - main changes:
Lots of renaming/refactoring:
- to retrieve reference from tmp, now need to use tmp.ref() as opposed to tmp()
- fvc::flux function to replace fvc::interpolate(<field>) &...Integrating latest code from the OF Foundation - main changes:
Lots of renaming/refactoring:
- to retrieve reference from tmp, now need to use tmp.ref() as opposed to tmp()
- fvc::flux function to replace fvc::interpolate(<field>) & mesh.Sf()
- integration of new c++ features: no more spaces between closing template braces, e.g. class1<class2<Type> > becomes class1<class2<Type>>
- DataEntry renamed to Function1
New functionality:
- Updated 6DoF
- fvOptions support in turbulence modelshttps://develop.openfoam.com/Development/openfoam/-/merge_requests/220Mapping injected faces through interpolation2018-11-15T14:58:57ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMapping injected faces through interpolationImproved mapping of newly generated internal faces.
- these now get created (hexRef8) without supplying a master face/edge or point
- these get a mapped value by interpolating old surrounding faces
Code supplied by Daniel Rettenmaier <r...Improved mapping of newly generated internal faces.
- these now get created (hexRef8) without supplying a master face/edge or point
- these get a mapped value by interpolating old surrounding faces
Code supplied by Daniel Rettenmaier <rettenmaier@gsc.tu-darmstadt.de>
Date: Mon Mar 6 17:17:06 2017 +0100
Fix mapping for non-flux surfaceVectorFields and fix mapping of newly created internal faces
A more generalized approach should be consideredMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/150ENH: adjust infoSwitch to report host subscription (related to #531)2017-10-05T13:44:02ZMark OLESENENH: adjust infoSwitch to report host subscription (related to #531)- this compact form shows the subscription per host in the unsorted
mpi order
nProcs : 18
Hosts :
(
(node1 6)
(node2 8)
(node3 4)
)
This provides a succinct overview of which h...- this compact form shows the subscription per host in the unsorted
mpi order
nProcs : 18
Hosts :
(
(node1 6)
(node2 8)
(node3 4)
)
This provides a succinct overview of which hosts have been
subscribed or oversubscribed.
- The longer list of "slave.pid" ... remains available on the
InfoSwitch 'writeHosts'Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/107Updated random numbers2017-04-28T09:11:19ZAdminUpdated random numbersPreviously there were 2 random number generator classes - `Random` and `cachedRandom`. These have been consolidated by:
- removing/deprecating the `Random` class
- renaming the `cachedRandom` class to `Random`
The `Random` class no...Previously there were 2 random number generator classes - `Random` and `cachedRandom`. These have been consolidated by:
- removing/deprecating the `Random` class
- renaming the `cachedRandom` class to `Random`
The `Random` class now stores its own buffer and uses the re-entrant system random functions so that each instantiation is not affected by each call to (re-)initialise the random number seed. The caching of the random numbers is not required since the generator can be reset using the same initial seed.Version v1706https://develop.openfoam.com/Development/openfoam/-/merge_requests/213Feature vtm/vtk2018-11-26T10:30:41ZMark OLESENFeature vtm/vtkIncludes numerous modifications to the VTK-related infrastructure. Notably it adds parallel output for foamToVTK and for the vtkWrite function object. Multi-region, multi-block VTM output with associated time-series files. TimeValue time...Includes numerous modifications to the VTK-related infrastructure. Notably it adds parallel output for foamToVTK and for the vtkWrite function object. Multi-region, multi-block VTM output with associated time-series files. TimeValue time-stamps within all the generated files. Improvements to the vtkCloud and vtkWrite function objects to allow selection of regions of interest.v1812Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/56ENH: distinguish OpenFOAM version for user-coding (fixes #195)2016-12-23T12:44:52ZMark OLESENENH: distinguish OpenFOAM version for user-coding (fixes #195)The pre-processor macro 'OPENFOAM_PLUS' is defined with a numerical
value equal to the currently compatible version number.
This can be used judiciously within user coding to help with minor
differences between OpenFOAM versions. Fo...The pre-processor macro 'OPENFOAM_PLUS' is defined with a numerical
value equal to the currently compatible version number.
This can be used judiciously within user coding to help with minor
differences between OpenFOAM versions. For example,
#ifdef OPENFOAM_PLUS
#if (OPENFOAM_PLUS >= 1612)
...
#endif
#endif
or simply
#if (OPENFOAM_PLUS >= 1612)
...
#endifAdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/205Feature iso advector AMR2018-06-13T13:44:39ZJohan RoenbyFeature iso advector AMR1. interIsoFoam rewritten based on the new interFoam including DyM functionality.
2. isoAdvection, isoCutFace and isoCutCell classes modified to work with AMR (dynamicRefineFvMesh).
3. Refactoring of isoAdvection, isoCutFace and isoCut...1. interIsoFoam rewritten based on the new interFoam including DyM functionality.
2. isoAdvection, isoCutFace and isoCutCell classes modified to work with AMR (dynamicRefineFvMesh).
3. Refactoring of isoAdvection, isoCutFace and isoCutCell (not related to AMR functionality).
4. Included damBreakWithObstacle test case for interIsoFoam with dynamicRefineFvMesh.
5. Added discInConstantFlowCyclicBC case for interIsoFoam to confirm proper behaviour with cyclic BC's (not AMR related).
I have tested the changes by compiling, running all interIsoFoam tutorials and verified visually that everything looks OK.
Known issue: isoCutFace sometimes gives a warning related to an edge being cut multiple times by the isoFace (There are around 20 such warnings in the damBreakWithObstacle log). It does not seem to have any effect on the results. I have not so far been able to locate the cause of these warnings.
Best regards
Johanv1806AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/188Simplify argList methods names and add more compat options2018-01-12T14:24:38ZMark OLESENSimplify argList methods names and add more compat optionsAdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/184Style config2017-12-14T12:02:14ZMark OLESENStyle configv1712Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/200ENH: new bitSet class and improved PackedList class (closes #751)2018-04-25T10:40:00ZMark OLESENENH: new bitSet class and improved PackedList class (closes #751)- The bitSet class replaces the old PackedBoolList class.
The redesign provides better block-wise access and reduced method
calls. This helps both in cases where the bitSet may be relatively
sparse, and in cases where advantage ...- The bitSet class replaces the old PackedBoolList class.
The redesign provides better block-wise access and reduced method
calls. This helps both in cases where the bitSet may be relatively
sparse, and in cases where advantage of contiguous operations can be
made. This makes it easier to work with a bitSet as top-level object.
In addition to the previously available count() method to determine
if a bitSet is being used, now have simpler queries:
- all() - true if all bits in the addressable range are empty
- any() - true if any bits are set at all.
- none() - true if no bits are set.
These are faster than count() and allow early termination.
The new test() method tests the value of a single bit position and
returns a bool without any ambiguity caused by the return type
(like the get() method), nor the const/non-const access (like
operator[] has). The name corresponds to what std::bitset uses.
The new find_first(), find_last(), find_next() methods provide a faster
means of searching for bits that are set.
This can be especially useful when using a bitSet to control an
conditional:
OLD (with macro):
forAll(selected, celli)
{
if (selected[celli])
{
sumVol += mesh_.cellVolumes()[celli];
}
}
NEW (with const_iterator):
for (const label celli : selected)
{
sumVol += mesh_.cellVolumes()[celli];
}
or manually
for
(
label celli = selected.find_first();
celli != -1;
celli = selected.find_next()
)
{
sumVol += mesh_.cellVolumes()[celli];
}
- When marking up contiguous parts of a bitset, an interval can be
represented more efficiently as a labelRange of start/size.
For example,
OLD:
if (isA<processorPolyPatch>(pp))
{
forAll(pp, i)
{
ignoreFaces.set(i);
}
}
NEW:
if (isA<processorPolyPatch>(pp))
{
ignoreFaces.set(pp.range());
}
v1806AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/198Feature wmake2018-04-11T11:35:11ZMark OLESENFeature wmakeIntroduce C++-based make depend parser (using ragel FSM parser) to address #784, but also to reduce some dependency on Flex (which may be out of date on some systems).Introduce C++-based make depend parser (using ragel FSM parser) to address #784, but also to reduce some dependency on Flex (which may be out of date on some systems).v1806Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/185update for third-party versions2017-12-15T12:28:38ZMark OLESENupdate for third-party versionsv1712Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/204Feature ico reacting multiphase inter foam dev2018-06-21T07:28:49ZSergio FerrarisFeature ico reacting multiphase inter foam devnew icoReactingMultiphaseInterFoam and new laser DTRM models.
This is an incompressible solver which can handle mass/heat exchange between phases and multi-species inside
each phasenew icoReactingMultiphaseInterFoam and new laser DTRM models.
This is an incompressible solver which can handle mass/heat exchange between phases and multi-species inside
each phasehttps://develop.openfoam.com/Development/openfoam/-/merge_requests/131STYLE: New syntax compatible with v1706 (Fixes #548)2017-08-17T13:51:47ZPrashant SonakarSTYLE: New syntax compatible with v1706 (Fixes #548)Fixes #548Fixes #548AdminAdmin