openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2018-11-08T20:50:48Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/217Work-package-09 geometric constraint2018-11-08T20:50:48ZMark OLESENWork-package-09 geometric constraintThe geometric decomposition constraint (issue #921) may be used to restrict the mesh decomposition on a geometrical basis.
For example, to avoid splitting of a sensitive feature across processor boundaries.
The geometry constraints are...The geometric decomposition constraint (issue #921) may be used to restrict the mesh decomposition on a geometrical basis.
For example, to avoid splitting of a sensitive feature across processor boundaries.
The geometry constraints are described by topoSet face sources, which can include basic geometrically entities (sphere, box, cylinder), mesh entities (eg, faces associated with a cellSet) or an arbitrary closed surface (stl, obj, etc). The support for arbitrary closed surfaces uses a triSurfaceMesh topoSetFaceSource.v1812Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/182WIP: Integration of IH Cantabria wave modelling contributions2019-10-03T10:38:02ZAdminWIP: Integration of IH Cantabria wave modelling contributions## New code
New wave generation model:
- `streamFunction`: based on Fenton's Fourier approximation
New interFoam-based solver:
- `interPorousFoam`: alternative method to include porosity effects, to be used with new `fvOptions` (se...## New code
New wave generation model:
- `streamFunction`: based on Fenton's Fourier approximation
New interFoam-based solver:
- `interPorousFoam`: alternative method to include porosity effects, to be used with new `fvOptions` (see below)
New `fvOptions`:
- `multiphasePorositySource`: porosity for multiphase flows
- `mangrovesSource`: mangrove interaction, i.e. drag and turbulence contributions for k-epsilon based models
## Test cases:
- interPorousFoam/porousDamBreak
- interPorousFoam/mangroves
## References:
Solitary wave attenuation by vegetation patches.
Maza, M, Lara, J.L., & Losada, I.J. (2016)
Advances in Water Resources. Vol.98, pp. 159-172
https://doi.org/10.1016/j.advwatres.2016.10.021
Tsunami wave interaction with mangrove forests: A 3-D numerical approach.
Maza, M, Lara, J.L., & Losada, I.J. (2015)
Coastal Engineering. Vol.98, pp. 33-54
https://doi.org/10.1016/j.coastaleng.2015.01.002
## Code integration
- Initial code supplied in commits e0682d67 and 2124eb88; and integrated into OpenFOAM by OpenCFDv1712AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/238WIP: functionObject: Lamb Vector and its Divergence2019-02-14T12:10:31ZKutalmış BerçinWIP: functionObject: Lamb Vector and its Divergence### Summary
Potential VW Sub-Project: Lamb Vector and its Divergence functionObject.
Lamb vector is the cross-product of vorticity and velocity.
The motivation to do so stems from the close connection between the Lamb vector div...### Summary
Potential VW Sub-Project: Lamb Vector and its Divergence functionObject.
Lamb vector is the cross-product of vorticity and velocity.
The motivation to do so stems from the close connection between the Lamb vector divergence and the motions in a flow, especially those instantaneous motions in turbulent flows, having a distinctively high capacity to effect a time rate of change of momentum, and generate forces such as drag.
### Resolved bugs (If applicable)
N/A
### Details of new models (If applicable)
Verification, hence pictures, will be provided based on the plane channel flow cases reported the journal paper below:
The Lamb vector divergence in Navier–Stokes flows, J. Fluid Mech. (2008), vol. 610, pp. 261–284., doi:10.1017/S0022112008002760O
### Risks
Not that I know of.https://develop.openfoam.com/Development/openfoam/-/merge_requests/61WIP: ENH: runTimePostProcessing - added option to clear/remove objects after use2016-12-15T15:52:25ZAdminWIP: ENH: runTimePostProcessing - added option to clear/remove objects after useWhen specifying line and surface function-object-based visualisation, use the optional 'clearObjects' flag to indicate that source objects should be removed/cleared after use.
Test case: [cavity.tgz](/uploads/742a7620da483538fecee15e2ca...When specifying line and surface function-object-based visualisation, use the optional 'clearObjects' flag to indicate that source objects should be removed/cleared after use.
Test case: [cavity.tgz](/uploads/742a7620da483538fecee15e2ca79e32/cavity.tgz)
Syntax:
```
surfaces
{
cuttingPlane1
{
type functionObject;
functionObject cuttingPlane;
clearObjects yes; // new option
...
```
Note: only files that have been used will be removed, e.g. if a function object has created multiple surface files, unused files will remain at the end of the run - in the attached case the p surface remains...Version v1612AdminAdminhttps://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/506turbulentTemperatureRadCoupledMixed allow Function1 for kappa2021-12-02T08:53:16ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comturbulentTemperatureRadCoupledMixed allow Function1 for kappa### Summary
- allow PatchFunction1 for kappa, alpha
- allow PatchFunction for thicknessLayer, kappaLayer
### Resolved bugs (If applicable)
#2277
### Risks
New keyword:
'kappaLayer', 'thicknessLayer' to specify a PatchFunction1 fo...### Summary
- allow PatchFunction1 for kappa, alpha
- allow PatchFunction for thicknessLayer, kappaLayer
### Resolved bugs (If applicable)
#2277
### Risks
New keyword:
'kappaLayer', 'thicknessLayer' to specify a PatchFunction1 for additional resistance.Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/87Surf field sampling2016-12-15T17:34:46ZMark OLESENSurf field samplingVersion v1612AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/77Surface declutter - issue #2942016-11-14T12:43:40ZMark OLESENSurface declutter - issue #294Removing various clutter from surfMesh and triSurface
- unused classes/files (backup copies on non-release repo)
- relocate some triSurface-related classes to where they make more sense, and where they can be reused.
- improve handlin...Removing various clutter from surfMesh and triSurface
- unused classes/files (backup copies on non-release repo)
- relocate some triSurface-related classes to where they make more sense, and where they can be reused.
- improve handling of various face types in MeshedSurface and UnsortedMeshedSurface (to bridge the gap to triSurface)
- improve transfer methods for reclaiming/reusing surface allocationsVersion v1612Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/457support parallel creation of finiteArea meshes with on-the-fly decomposition ...2021-05-28T18:14:55ZMark OLESENsupport parallel creation of finiteArea meshes with on-the-fly decomposition of fields #2084v2106Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/331Submodule visualization2020-01-23T14:24:33ZMark OLESENSubmodule visualizationThis finalises the work done to collect visualization-related items:
- catalyst
- paraview-plugins
- runTimePostProcessing
into a single place.
- Makes it easier to make related code changes.
- Makes it easier to mix and match differen...This finalises the work done to collect visualization-related items:
- catalyst
- paraview-plugins
- runTimePostProcessing
into a single place.
- Makes it easier to make related code changes.
- Makes it easier to mix and match different combinations of VTK/ParaView versions and capabilities (Eg, MESA, MPI etc).
Replaces the standalone catalyst submodule.Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/503sampledSets - enable writer construction from dictionary; glTF export2021-12-06T13:14:10ZAndrew HeathersampledSets - enable writer construction from dictionary; glTF export## sampledSets - added writer construction from dictionary
The `sampledSets` `writer` is now constructed with a dictionary to enable custom options using a new `formatOptions` dictionary - see example below.
## glTF format
glTF is a c...## sampledSets - added writer construction from dictionary
The `sampledSets` `writer` is now constructed with a dictionary to enable custom options using a new `formatOptions` dictionary - see example below.
## glTF format
glTF is a common data exchange format for virtual reality software, e.g. [ESI's IC.IDO](https://www.esi-group.com/products/virtual-reality). Scenes are described using a JSON representation and the field/binary data is stored in an external file.
These changes add [glTF v2](https://www.khronos.org/registry/glTF/) as an option when writing `sampledSets` and particle tracks.
Note: glTF files can also be read in ParaView v5.9
### Additions:
- The `particleTracks` utility:
- output path has been updated to `postProcessing/lagrangian/<cloudNme>/particleTracks/`;
- has a new option to limit the number of tracks exported; and
- supports field export (previously only geometry was written).
- example:
cloud reactingCloud1;
sampleFrequency 1;
maxPositions 1000000;
//maxTracks 5; // optional limit on the number of tracks
setFormat <format>;
// Optional field specification; wildcards supported
// - if ommitted all fields are written
fields (d T);
- glTF format support added to sampledSets, e.g.
type sets;
libs (sampling);
interpolationScheme cellPointFace;
setFormat gltf;
### glTF format options
Controls are exposed via the `formatOptions` dictionary, e.g.
setFormat gltf;
formatOptions
{
...
}
Options include:
- Adding colour (RGBA):
formatOptions
{
colour yes;
}
By default, this will add colour fields named `COLOR_0`, `COLOR_1`, ... `COLOR_N` corresponding to each value field, using the default colour map (coolToWarm), anchoring the colour map limits to the field minimum and maximum.
Individual field specification is enabled using a `fieldInfo` sub-dictionary, e.g.
formatOptions
{
colour yes;
fieldInfo
{
T // Field name
{
// Optional colour map; default = coolToWarm
colourMap fire;
// Alpha channel description
alpha field; // uniform | field;
//alphaValue 0.1; // uniform alpha value
alphaField T;
normalise yes;
}
}
}
Note that when using the `field` option for alpha channel scaling, the selected field should be the same type as the field being output, i.e. scalar, vector etc. since the fields are grouped into their primitive types when output.
![Screenshot_from_2021-11-26_14-40-53](/uploads/28f5fd037e102b9887a38c08d59cf5eb/Screenshot_from_2021-11-26_14-40-53.png)
Particle tracks have some additional options:
- Static tracks can be written as a set of points along the track (lines support may be added in the future). Specification is the same as above
![Screenshot_from_2021-11-26_14-40-27](/uploads/a3f687dd4ccd9d5cca5e80e830c0fdef/Screenshot_from_2021-11-26_14-40-27.png)
- Tracks can be animated, i.e. seeding a particle at the start of the track and then updating its position as a function of time:
```
formatOptions
{
animate yes;
colour yes;
animationInfo
{
colour field;
colourMap rainbow;
colourField d;
// Optional colour map min and max limits
//min 0;
//max 0.002;
//alpha uniform;
//alphaValue 1;
alpha field;
alphaField d;
normalise yes;
}
}
```
Note that the particle colour for animated tracks remains constant; dynamic colour values are not currently supported by the format.
## Examples
See:
- $FOAM_TUTORIALS/lagrangian/reactingParcelFoam/filter/system/sample
- $FOAM_TUTORIALS/lagrangian/reactingParcelFoam/filter/constant/particleTrackProperties
- $FOAM_TUTORIALS/lagrangian/reactingParcelFoam/filter/constant/particleTrackProperties.animatev2112Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/81runTimePostProcessing FO camera update2016-12-06T09:24:24ZAdminrunTimePostProcessing FO camera update- Removed the camera 'mode'
- The (old) static camera was only appropriate when parallel
projection was inactive, and the view was centred at (0 0 0)
- Camera input now always requires 'position' and 'focalPoint'
- ...- Removed the camera 'mode'
- The (old) static camera was only appropriate when parallel
projection was inactive, and the view was centred at (0 0 0)
- Camera input now always requires 'position' and 'focalPoint'
- Clip box is now optional. Note that this is applied after the
camera
set-up and so will override the camera position
- View angle is only appropriate when not using parallel projection
- Zoom now required, applied after all other operations
- 1 = do nothing, >1 = zoom in, <1 = zoom out
Example input:
```
camera
{
// Total number of frames to generate
nFrameTotal 1;
// Parallel projection flag
parallelProjection no;
focalPoint (0 0 0);
up (0 1 0);
position (0 0 1);
// Optional entries
clipBox (-0.0206 -0.0254 -0.0005) (0.29 0.0254 0.0005);
viewAngle 20;
zoom 1.1;
}
```Version v1612AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/70Reworking of the ensight infrastructue and new ensightWrite function object2016-11-03T08:24:53ZMark OLESENReworking of the ensight infrastructue and new ensightWrite function objectAdminAdminhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/379remove cyclic dependencies for phase systems2020-08-06T06:23:44ZMark OLESENremove cyclic dependencies for phase systems### centralize more libraries in src/phaseSystemModels
### avoid phaseSystem cyclic dependencies, reduce number of libraries
Previously the phaseSystems had a number of smaller libraries to
provide interface and model properties. ...### centralize more libraries in src/phaseSystemModels
### avoid phaseSystem cyclic dependencies, reduce number of libraries
Previously the phaseSystems had a number of smaller libraries to
provide interface and model properties. However, the cyclic
dependencies between phaseSystem and the models (and turbulence)
causes extreme difficultly for mingw linking. The potential
additional flexibility is not actually used anywhere.
- libincompressibleMultiphaseSystems
- removed: libmassTransferModels
- libmultiphaseSystem
- removed: libcompressibleMultiphaseEulerianInterfacialModels
- libreactingMultiphaseSystem
- removed: libreactingPhaseSystem
- removed: libreactingEulerianFvPatchFields
- removed: libreactingEulerianInterfacialCompositionModels
- removed: libreactingEulerianInterfacialModels
- removed: libmultiphaseReactingTurbulenceModels
- libreactingTwoPhaseSystem
- removed: libreactingPhaseSystem
- removed: libreactingEulerianFvPatchFields
- removed: libreactingEulerianInterfacialCompositionModels
- removed: libreactingEulerianInterfacialModels
### Avoid duplicate symbol for phaseCompressibleTurbulenceModels.
Common turbulence models are defined in libreactingMultiphaseSystem,
and libmultiphaseReactingTurbulenceModels is now redundant.
The libtwoPhaseReactingTurbulenceModels extends the common models
for reactingTwoPhaseSystem.Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/merge_requests/524refactor coordSet writers (#2347)2022-04-12T14:54:13ZMark OLESENrefactor coordSet writers (#2347)### Summary
Replace old, stateless, templated _writer_ class with a _coordSetWriter_ class that more closely resembles _surfaceWriter_. It is time-aware and can be used as a streamer with sample/write of each field instead of accumulati...### Summary
Replace old, stateless, templated _writer_ class with a _coordSetWriter_ class that more closely resembles _surfaceWriter_. It is time-aware and can be used as a streamer with sample/write of each field instead of accumulating all of the sampled fields ahead of time.v2206Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/369New Weber number cloud function object2020-06-11T14:00:37ZAndrew HeatherNew Weber number cloud function objectExample usage:
cloudFunctions
{
WeberNumber1
{
type WeberNumber;
}
}
This will calculate and write the Weber number field as a 'standard' cloud field, available for post-proces...Example usage:
cloudFunctions
{
WeberNumber1
{
type WeberNumber;
}
}
This will calculate and write the Weber number field as a 'standard' cloud field, available for post-processing alongside other lagrangian fields in the lagrangian/<cloudName> directory.
See example in `$FOAM_TUTORIALS/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties`v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/316New VOF multiphaseStabilizedTurbulence fvOption2019-12-19T08:46:51ZAndrew HeatherNew VOF multiphaseStabilizedTurbulence fvOption### Summary
Applies corrections to turbulence kinetic energy equation and turbulence viscosity field for incompressible multiphase flow cases.
Turbulence kinetic energy is over-predicted in incompressible VOF solvers at the phase i...### Summary
Applies corrections to turbulence kinetic energy equation and turbulence viscosity field for incompressible multiphase flow cases.
Turbulence kinetic energy is over-predicted in incompressible VOF solvers at the phase interface and throughout the water column in nearly-potential flow regions beneath surface waves.
This fvOption applies corrections based on the references:
Buoyancy source term in turbulence kinetic energy equation:
Devolder, B., Rauwoens, P., and Troch, P. (2017).
Application of a buoyancy-modified k-w SST turbulence model to
simulate wave run-up around a monopile subjected to regular waves
using OpenFOAM.
Coastal Engineering, 125, 81-94.
Correction to turbulence viscosity:
Larsen, B.E. and Fuhrman, D.R. (2018).
On the over-production of turbulence beneath surface waves in
Reynolds-averaged Navier-Stokes models
J. Fluid Mech, 853, 419-460
### Resolved bugs (If applicable)
See #1433
### Details of new models (If applicable)
The implementation is based on the form for the k-epsilon turbulence model.
Example usage:
multiphaseStabilizedTurbulence1
{
type multiphaseStabilizedTurbulence;
active yes;
multiphaseStabilizedTurbulenceCoeffs
{
// Optional coefficients
lambda2 0.1; // A value of 0 sets the nut correction to 0
Cmu 0.09; // from k-epsilon model
C 1.51; // model coefficient from k-omega model
alpha 1.36; // 1/Prt
}
}
The model `C` coefficient for the k-epsilon model equates to C2/C1 = 1.33; the (default) value of 1.51 comes from the k-omega model and is more conservative.
### Risks
Modular - low risk
### Credits
Thanks go to the Turbulence Technical Committee, and the useful discussions with and code testing by Bjarke Eltard-Larsen and David Fuhrman (Technical University of Denmark).v1912https://develop.openfoam.com/Development/openfoam/-/merge_requests/271lumped point motion using local linear basic functions (#1341)2020-06-17T14:15:52ZMark OLESENlumped point motion using local linear basic functions (#1341)Extends lumped point motion to support multiple connectivity.
Examples include structures such as bridges.Extends lumped point motion to support multiple connectivity.
Examples include structures such as bridges.v2006Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/521Lagrangian modelling updates/new features2021-12-15T10:46:58ZAndrew HeatherLagrangian modelling updates/new featuresMultiple enhancements:
- `PatchInjectionModel`: updated to include additional velocity specification options
- `ConeNozzleInjection`: updated to enable dynamic position and direction vectors
- `FaceInteraction`: new `cloudFunctionObject...Multiple enhancements:
- `PatchInjectionModel`: updated to include additional velocity specification options
- `ConeNozzleInjection`: updated to enable dynamic position and direction vectors
- `FaceInteraction`: new `cloudFunctionObject`
## PatchInjectionModel
The parcel initial velocity can now be set using the new `velocityType`
entry, taking one of the following options:
- `fixedValue` : (default) same as earlier versions, requires `U0`
- `patchValue` : velocity set to seed patch face value
- `zeroGradient` : velocity set to seed patch face adjacent cell value
Example usage:
```
model1
{
type patchInjection;
massTotal 1;
SOI 0;
parcelBasisType mass;
patch cylinder;
duration 10;
parcelsPerSecond 100;
velocityType patchValue;
//velocityType zeroGradient;
//U0 (-10 0 0);
flowRateProfile constant 1;
sizeDistribution
{
type normal;
normalDistribution
{
expectation 1e-3;
variance 1e-4;
minValue 1e-5;
maxValue 2e-3;
}
}
}
```
See the new $FOAM_TUTORIALS/lagrangian/kinematicParcelFoam/spinningDisk tutorial
## ConeNozzleInjection
- Now only has the options `point` and `disk` (deprecated `movingPoint`)
- moving state is based on the type of `Function1`
- The position and direction entries are `Function1`-types, e.g. for the `table` type the entries could be:
```
position table
(
( 0 (0.1 0.5 0.5))
(0.2 (0.5 0.9 0.5))
(0.4 (0.9 0.5 0.5))
(0.6 (0.5 0.1 0.5))
(0.8 (0.5 0.5 0.9))
(1.0 (0.5 0.9 0.5))
(1.2 (0.5 0.5 0.1))
(1.4 (0.5 0.1 0.5))
);
direction table
(
( 0 ( 1 0 0))
(0.2 ( 0 -1 0))
(0.4 (-1 0 0))
(0.6 ( 0 1 0))
(0.8 ( 0 0 -1))
(1.0 ( 0 -1 0))
(1.2 ( 0 0 1))
(1.4 ( 0 1 0))
);
```
## FaceInteraction
Enables particles to interact with mesh faces (described using `faceZones`).
```
faceInteraction1
{
type faceInteraction;
faceZones
(
(blockageFaces stick)
// (blockageFaces escape)
// (blockageFaces rebound) // not applicable for this test case (!)
);
dMin 0;
dMax 1;
}
The `faceZones` entry is a list of (`faceZoneName` `interactionType`), where interaction type is either `stick`, `escape` or `rebound`.
No tutorial added yet; for testing: reactingParcelFoam case: [filter.tgz](/uploads/e0034538f6c9bb85c0cfa3e1068a6ba2/filter.tgz)v2112https://develop.openfoam.com/Development/openfoam/-/merge_requests/284Issue 1454 post process2019-10-17T12:26:30ZAdminIssue 1454 post processUpdated `postProcess` for mesh changes to update the function objects instead of performing a full clear-outUpdated `postProcess` for mesh changes to update the function objects instead of performing a full clear-outv1912AdminAdmin