openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2019-02-14T12:10:31Zhttps://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/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/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/513Draft: Resolve "patchProbes output original point and distance"2021-12-09T08:56:39ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comDraft: Resolve "patchProbes output original point and distance"Closes #2291Closes #2291Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/514Draft: Resolve "patchProbes output original point and distance"2021-12-09T08:56:46ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comDraft: Resolve "patchProbes output original point and distance"Closes #2291Closes #2291Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/526Draft: Resolve "ENH: cyclicACMI have optional search distance"2022-06-01T08:14:25ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comDraft: Resolve "ENH: cyclicACMI have optional search distance"Closes #2378Closes #2378Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/675Draft: update to internal accounting for finite-area2024-03-28T14:32:47ZMark OLESENDraft: update to internal accounting for finite-areaChanges the internal storage location of finite-area from the polyMesh registry to a dedicated registry.
This allows a clearer separation of field types without name clashes (eg, can now have "U" as a name for an area velocity field). It...Changes the internal storage location of finite-area from the polyMesh registry to a dedicated registry.
This allows a clearer separation of field types without name clashes (eg, can now have "U" as a name for an area velocity field). It is also a prerequisite to supporting multiple finite-area fields in the future.
Example of old locations:
```
0/Us
constant/faMesh
system/faSolution
```
New locations:
```
0/finite-area/Us
constant/finite-area/faMesh
system/finite-area/faSolution
```
The updated locations are handled by the `foamUpgradeFiniteArea` script, which provides a simple and transparent means of managing the upgrading without adding in multiple layers of compatibility handling within the code.v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/667Draft: ENH: Polyhedral AMR2024-02-22T15:34:38ZKutalmış BerçinDraft: ENH: Polyhedral AMR@Development
Test cases: [MR666-test-cases-22Feb24.zip](/uploads/5d70f346da25f7e66088c5dbd0812eef/MR666-test-cases-22Feb24.zip)@Development
Test cases: [MR666-test-cases-22Feb24.zip](/uploads/5d70f346da25f7e66088c5dbd0812eef/MR666-test-cases-22Feb24.zip)Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/648ENH: KinematicWeberNumber: New cloud function object2023-12-05T09:48:44ZKutalmış BerçinENH: KinematicWeberNumber: New cloud function object### Summary
Calculates and writes particle Weber number field on the cloud.
See the header file documentations for the details.
### Risks
No change in existing input/output.
#### Metadata
- [x] linux64ClangDPInt32Opt (clang15)
- [x]...### Summary
Calculates and writes particle Weber number field on the cloud.
See the header file documentations for the details.
### Risks
No change in existing input/output.
#### Metadata
- [x] linux64ClangDPInt32Opt (clang15)
- [x] linux64GccDPInt32Opt
- [x] linux64GccSPDPInt64Debug
- [x] Alltest: No new error/No change in existing output
- [x] Test cases: `$FOAM_TUTORIALS/lagrangian/kinematicParcelFoam/spinningDisk`v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/646Extract case and solver information2023-12-04T09:51:36ZAndrew HeatherExtract case and solver informationSeries of changes to support extraction of case/solver information in OpenFOAM dictionary/JSON formats.
- ENH: checkMesh - added -writeChecks option
- TUT: Added caseInfo function object example
- ENH: Added new caseInfo function object...Series of changes to support extraction of case/solver information in OpenFOAM dictionary/JSON formats.
- ENH: checkMesh - added -writeChecks option
- TUT: Added caseInfo function object example
- ENH: Added new caseInfo function object
- ENH: Added new JSONformatter to write Ostream content in JSON format
- ENH: polyMeshCheck - added mesh quality metrics to meshState dictionary
- STYLE: Refactoring use of meshState in {fv|faMesh}
- STYLE: renamed/moved 'data' to 'meshState'v2312Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/644Added Abaqus sampling and writing2023-12-04T12:32:19ZAndrew HeatherAdded Abaqus sampling and writingAdds:
- Abaqus mesh `sampledSet` : `abaqusMesh`
- Abaqus co-ord set writer : `abaqus`
- Added field level/scale from surface writers to co-ord writersAdds:
- Abaqus mesh `sampledSet` : `abaqusMesh`
- Abaqus co-ord set writer : `abaqus`
- Added field level/scale from surface writers to co-ord writersv2312Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/639ENH: Reduced-order modelling field reconstruction with DMD2023-11-24T19:57:20ZKutalmış BerçinENH: Reduced-order modelling field reconstruction with DMD#### Acknowledgement
OpenCFD would like to acknowledge and thank **Marco Kiewat** for his contributions, elaborate suggestions and help, and critical recommendations. Highly appreciated.
#### Problem
- OpenFOAM currently lacks one of ...#### Acknowledgement
OpenCFD would like to acknowledge and thank **Marco Kiewat** for his contributions, elaborate suggestions and help, and critical recommendations. Highly appreciated.
#### Problem
- OpenFOAM currently lacks one of the key advantages of DMD:
- the capability to generate a field based on given modes and their associated dynamics, without the need for any CFD computations at arbitrary intermediate and/or future time points.
- This functionality would allow users to condense an entire simulation into a few modes and mode dynamics, and subsequently generate fields at any desired time or predict their future states of periodic or pseudo-periodic systems, all without the need for additional CFD analyses.
#### Solution
Implement and verify the method proposed by [Kiewat (2019)](https://mediatum.ub.tum.de/doc/1482652/815436.pdf) to generate time-variant field data from DMD data for a set of specified times.
#### Verification
##### Coarse mesh
![image](/uploads/a00f43670020abb4737a0e37306ea550/image.png)
![coarse](/uploads/000bb2117e883f9ca7cfebeb2c3b7f2c/coarse.mp4)
##### Fine mesh
![image](/uploads/d3e5ba304c0997de719d6eb07dee918b/image.png)
![fine](/uploads/6d1d980ba1a1eb42ba8a8cc79d8d0396/fine.mp4)
#### Discussion
- The quality of results depends on the capabilities of the underlying reduced-order model, and the quality of the input data.
- To improve the reconstruction results, one needs to make sure that modes are correctly extracted from the flow.
- The easiest method to check the quality:
- Inspect the real part of the first mode visually.
- Compare it with the time-mean of the operand decomposed field.
- The real part of the first mode should always look like the time-mean of the operand decomposed field.
- If both fields are dissimilar, expect low quality results from the `createROMfields`.
#### Risks
- No change in existing input/output.
- The tutorial `$FOAM_TUTORIALS/incompressible/pimpleFoam/laminar/cylinder2D` is run for a longer period.
- Also, the parallel `renumberMesh` operation is removed from its existing `Allrun` script.
#### Metadata
- [x] linux64ClangDPInt32Opt (clang15)
- [x] linux64GccDPInt32Opt
- [x] linux64GccSPDPInt64Debug
- [x] Alltest: No new error/No change in existing output
- [x] Test cases: `$FOAM_TUTORIALS/incompressible/pimpleFoam/laminar/cylinder2D`v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/630ENH: Moving electric sources mapped from external meshes2023-11-03T14:33:12ZKutalmış BerçinENH: Moving electric sources mapped from external meshes#### Problem
As of the current state of OpenFOAM, the following capabilities are not available:
- The ability to dynamically update cell selections in `fvOptions` through input dictionary updates.
- The absence of support in `fvOptions...#### Problem
As of the current state of OpenFOAM, the following capabilities are not available:
- The ability to dynamically update cell selections in `fvOptions` through input dictionary updates.
- The absence of support in `fvOptions` for handling moving selections, such as moving points.
- The inability to map static fields from external sources for further processing, for instance, when dealing with moving static electric-source fields within an electric field being simulated.
#### Solution
- The `cellSetOption` (hence, all `fvOptions` derived from the `cellSetOption`) received three new optional input:
- `movingPoints`: Use cells containing a given set of moving points.
- ~~`mesh`: Select cells based on a given secondary mesh.~~
- `updateSelection`: Flag to enable selection updates.
- New templated `fvOption` to constrain values of given fields with a source field from an external mesh: `<Type>MapFieldConstraint`.
- A new hook to `electricPotential` function object to accomodate internal `fvOption` constraints.
#### Verification
- (Heuristic) Test cases:[moving-electric-potential.zip](/uploads/c242520ec4e70ab52bb520446f386b24/moving-electric-potential.zip) (Prior to the review changes)
#### Risks
- No change in existing input/output.
#### Metadata
- [x] linux64ClangDPInt32Opt (clang13)
- [x] linux64GccDPInt32Opt
- [x] linux64GccSPDPInt64Debug
- [x] Alltest: No new error/No change in existing outputv2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/613ENH: sixDoF: add max/min angle constraints to the axis constraint2023-06-14T14:30:57ZKutalmış BerçinENH: sixDoF: add max/min angle constraints to the axis constraint#### Summary
The `axis` constraint imposes an orientation limitation where bodies
are restricted to rotate only around a fixed axis.
The set of commits optionally introduces the inclusion of maximum and
minimum rotation angle constrain...#### Summary
The `axis` constraint imposes an orientation limitation where bodies
are restricted to rotate only around a fixed axis.
The set of commits optionally introduces the inclusion of maximum and
minimum rotation angle constraints to the `axis` constraint.
##### Details
The following plot shows the rotation angle of the body modelled in "test-case.zip" with respect to the reference orientation. The inflow changes at t=2[s] and =4.5[s] to move the body in the opposite directions:
- Between t=0-2[s], the flow rotates the body in the clockwise direction. However, the body is limited by 0.15[rad] clockwise rotation wrt the ref orientation.
- Note that the ref orientation is at +0.25[rad] at t=0[s].
- Between t=2-4.5[s], the flow rotates the body in the counterclockwise direction. The body is limited to 0.05[rad] counterclockwise rotation wrt the ref orientation.
- Note that the body wants to rotate in the clockwise direction for sometime due to (I assume) some wake physics (or I need to reping the body to another point) between 3.5-4.5[s].
- Between t=4.5-8.5[s], the flow rotates the body in the clockwise direction, but this time, the rotation is limited to -0.1[rad] clockwise rotation.
<img src="/uploads/5a350ae505a61a12432a2011a3df377a/plot_theta_0.png" width="40%" height="40%">
#### Risks
- No change in existing input/output.
#### Metadata
- [x] linux64ClangDPInt32Opt (clang13)
- [ ] linux64GccDPInt32Opt
- [ ] linux64GccSPDPInt64Debug
- [ ] Alltest: No new error/No change in existing output
- [x] Test case: [test-case.zip](/uploads/42697e3e56b4f2faa249f7e5ebd5c976/test-case.zip)v2306Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/602ENH: Coulomb: new particle electric force model calculating Coulomb forces2023-05-15T15:35:14ZKutalmış BerçinENH: Coulomb: new particle electric force model calculating Coulomb forces#### Problem
OpenFOAM lacked a Lagrangian model for electrostatic forces acting on particles based on their diameters.
#### Solution
The present commits furnish a model of this kind, along with essential underlying changes in the 'ele...#### Problem
OpenFOAM lacked a Lagrangian model for electrostatic forces acting on particles based on their diameters.
#### Solution
The present commits furnish a model of this kind, along with essential underlying changes in the 'electricPotential' function object for evaluating the electric field. The coupling is one way (for now).
#### Meta-data
* EP1880
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new error/No change in existing output
* [x] No output change in all operating conditions except the following:
- The electric field is computed according to the new Boolean input `electricField` instead of `writeDerivedFields` toogle.Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/583ENH: added option to control log frequency of lagrangian calculations2022-12-09T10:05:42ZAndrew HeatherENH: added option to control log frequency of lagrangian calculations### Summary
Cross ref: EP#1945
Lagrangian cloud calculations can generate significant amounts of reporting, e.g.
Solving2-D cloud reactingCloud1
Cloud: reactingCloud1
Current number of parcels = 994
Curre...### Summary
Cross ref: EP#1945
Lagrangian cloud calculations can generate significant amounts of reporting, e.g.
Solving2-D cloud reactingCloud1
Cloud: reactingCloud1
Current number of parcels = 994
Current mass in system = 0.009735873844
Linear momentum = (0.0001652067978 0.0001039875528 0)
|Linear momentum| = 0.0001952093676
Linear kinetic energy = 0.0001660812145
Average particle per parcel = 19.21387643
Injector model1:
- parcels added = 994
- mass introduced = 0.01
Parcel fate: system (number, mass)
- escape = 0, 0
Parcel fate: patch (walls|cyc.*) (number, mass)
- escape = 0, 0
- stick = 0, 0
Parcel fate: patch (inlet|outlet) (number, mass)
- escape = 0, 0
- stick = 0, 0
Temperature min/max = 275.039299, 275.4193813
Mass transfer phase change = 0.000264126156
Mass transfer devolatilisation = 0
Mass transfer surface reaction = 0
If multiple injectors and/or more interaction patches are present, the quantity of output information can increase dramatically.
For some workflows it can be beneficial to reduce the amount of output by reporting this data every `n` time steps instead of every step.
### Details of new models (If applicable)
Added an optional `logFrequency` keyword to the cloud solution input dictionary, e.g. in the `<case>/constant/*CloudProperties`
solution
{
active true;
coupled false;
transient yes;
cellValueSourceCorrection off;
maxCo 0.3;
logFrequency 3; // <--- NEW ENTRY
...
}
The value is set to 1 by default to maintain backwards compatibility.
### Risks
- Multiple small changes across the code - should be low risk.
- use of `Log_` vs `Log` annoying but needed for use in templated code - suggestions welcomev2212Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/580ENH: Brun dripping film injection2022-12-01T13:58:35ZKutalmış BerçinENH: Brun dripping film injectionEP2009
Test case: [dripping-test.zip](/uploads/972e684819c0a3b9b833e0d68e1d7560/dripping-test.zip)
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorEP2009
Test case: [dripping-test.zip](/uploads/972e684819c0a3b9b833e0d68e1d7560/dripping-test.zip)
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/579ENH: solidIsothermalReactionRate: new solid reaction rate model2022-11-29T14:31:17ZKutalmış BerçinENH: solidIsothermalReactionRate: new solid reaction rate modelEP2005, EP1629
##### Usage example
In `combustion/fireFoam/LES/simplePMMApanel/constant/panelRegion/reactions`:
```
reactions
{
_tmp_
{
#include "<constant>/panelRegion/thermo.solid"
}
charReaction
{
...EP2005, EP1629
##### Usage example
In `combustion/fireFoam/LES/simplePMMApanel/constant/panelRegion/reactions`:
```
reactions
{
_tmp_
{
#include "<constant>/panelRegion/thermo.solid"
}
charReaction
{
type irreversibleIsothermalSolidReaction;
reaction "PMMA = gas";
C <scalar>;
Tpc <scalar>;
Elat <scalar>;
Cp ${../_tmp_/PMMA/thermodynamics/Cp};
}
#remove _tmp_
}
```
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorMark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/577ENH: fvOptions: add writeFile functionality2022-12-08T11:37:58ZKutalmış BerçinENH: fvOptions: add writeFile functionalityEP2028
EP1947
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorEP2028
EP1947
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/575ENH: leastSquaresEdgeInterpolation: new edge interpolation method2022-12-01T12:24:45ZKutalmış BerçinENH: leastSquaresEdgeInterpolation: new edge interpolation methodDocumentation: [MR575-edgeInterpolation-scheme-23-Nov-22.pdf](/uploads/70de4f1a6735f8bf16fb630a5c158e18/MR-edgeInterpolation-scheme-23-Nov-22.pdf)
Test case: [MR575-edgeInterpolation-scheme-23-Nov-22.zip](/uploads/324646ab02997f421292bc...Documentation: [MR575-edgeInterpolation-scheme-23-Nov-22.pdf](/uploads/70de4f1a6735f8bf16fb630a5c158e18/MR-edgeInterpolation-scheme-23-Nov-22.pdf)
Test case: [MR575-edgeInterpolation-scheme-23-Nov-22.zip](/uploads/324646ab02997f421292bceda13cd9e8/finiteArea.zip)
##### Metadata
EP#1996
* [x] `linux64ClangDPInt32Opt` (clang13)
* [x] `linux64GccDPInt32Opt`
* [x] `linux64GccSPDPInt64Debug`
* [x] Alltest: No new errorv2212Andrew HeatherAndrew Heather