Development issueshttps://develop.openfoam.com/groups/Development/-/issues2020-01-06T10:30:33Zhttps://develop.openfoam.com/Development/openfoam/-/issues/822Function1 could use faster searching in input is sorted2020-01-06T10:30:33ZPrashant SonakarFunction1 could use faster searching in input is sortedIf the table is sorted in increasing order we could use a binary search (e.g. ListOps::findLower) to speed up interpolation.If the table is sorted in increasing order we could use a binary search (e.g. ListOps::findLower) to speed up interpolation.https://develop.openfoam.com/Development/openfoam/-/issues/2764Function1/CSV/CSV.C: Need to move explicit template specializations to a sep...2023-05-05T14:10:24ZMartin BeaudoinFunction1/CSV/CSV.C: Need to move explicit template specializations to a separate file (ex: CSVTemplates.C)<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be re...<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be rendered on the platform by using the
"preview" tab above
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
The file src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C contains 2 explicit template specializations for the member function ::readValue(). Those will be reported as multiply-defined by the linker when the corresponding file CSV.H gets included in the source code of a custom-build library depending on the core library libOpenFOAM.
<!-- Summarize the bug encountered concisely -->
### Steps to reproduce
Simply add the statement "#include CSV.H" in the source code of any custom-made library depending on the libOpenFOAM library.
Since the file CSV.C is included at the bottom of the file CSV.H, the 2 explicit template specializations will be reported as multiply-defined by the linker.
<!-- How one can reproduce the issue - this is very important -->
### Example case
This is a compilation issue.
<!--
If possible, please create a SMALL example and attach it to your report
If you are using an older version of OpenFOAM this will also determine
whether the bug has been fixed in a more recent version
-->
### What is the current *bug* behaviour?
The custom-build library fails to link.
An error message is written at the console stating that 2 instances of the template specialized member function ::readValue() are multiply-defined, and are first defined at lines 72 and 82 of src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
<!-- What actually happens -->
### What is the expected *correct* behaviour?
Proper linking of the custom-made library when using the class Foam::Function1Types::CSV.
<!-- What you should see instead -->
### Relevant logs and/or images
<!--
Paste any relevant logs - please use code blocks (```) to format console
output, logs, and code as it's very hard to read otherwise.
-->
### Environment information
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v2212|v2206|v2112|v2106|v2012 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version : probably all versions of OpenFOAM since the files CSV.[CH] were introduced.
- Operating system : Fedora 33
- Hardware info :
- Compiler : gcc 10.3.1
### Possible fixes
Move the following 2 explicit template specializations to a separate file like src/OpenFOAM/primitives/functions/Function1/CSV/CSVTemplates.C
Add the file CSVTemplates.C to the file src/OpenFOAM/Make/files.
From src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
```
65 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
66
67 template<>
68 Foam::label Foam::Function1Types::CSV<Foam::label>::readValue
69 (
70 const List<string>& strings
71 ) const
72 {
73 return readLabel(strings[componentColumns_[0]]);
74 }
75
76
77 template<>
78 Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue
79 (
80 const List<string>& strings
81 ) const
82 {
83 return readScalar(strings[componentColumns_[0]]);
84 }
```
<!--
If you can, link to the line of code that might be responsible for the
problem
The "/label ~bug" text is a gitlab flag that will add the "bug" label to this
issue
-->https://develop.openfoam.com/Development/openfoam/-/issues/1046Function1 does not know about coordinates2019-04-04T10:11:01ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comFunction1 does not know about coordinatesGeneral issue for development of PatchFunction1General issue for development of PatchFunction1https://develop.openfoam.com/Development/openfoam/-/issues/1778Function1Expression vector2020-07-20T14:15:05ZMatej FormanFunction1Expression vectorExample in file Function1Expression.H
for vector is not working (tested on cavity case in U file as is).
Entry in U:
```
movingWall
{
type uniformFixedValue;
uniformValue
{
typ...Example in file Function1Expression.H
for vector is not working (tested on cavity case in U file as is).
Entry in U:
```
movingWall
{
type uniformFixedValue;
uniformValue
{
type expression;
variables
(
"start = 0.5"
"stop = 1"
);
expression #{mag(arg() > start && arg() < stop) * vector(1, 0, 0) #};
}
}
```
Error message:
```
Reading field U
--> FOAM Warning :
From virtual Foam::Istream& Foam::ISstream::read(Foam::word&)
in file db/IOstreams/Sstreams/ISstream.C at line 482
Reading "/home/matej/PROJECTS/release2006/cavity/0/U" at line 35
Missing 1 closing ')' while parsing
mag(arg()
--> FOAM Warning :
Reading "/home/matej/PROJECTS/release2006/cavity/0/U" at line 35
Imbalanced '{' with ')'
--> FOAM Warning :
From virtual Foam::Istream& Foam::ISstream::read(Foam::word&)
in file db/IOstreams/Sstreams/ISstream.C at line 482
Reading "/home/matej/PROJECTS/release2006/cavity/0/U" at line 35
Missing 1 closing ')' while parsing
vector(1,
```Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/723Function1 missing Integrate function definition2021-07-06T11:44:45ZMatej FormanFunction1 missing Integrate function definitionOnly few functions from **Function1** has function **Integrate** implemented
(*table, CSV table, Polynomial and Zero/One*).
Those without the Integrate function definition cannot be used to specify the **motion function** for DyM.
Woul...Only few functions from **Function1** has function **Integrate** implemented
(*table, CSV table, Polynomial and Zero/One*).
Those without the Integrate function definition cannot be used to specify the **motion function** for DyM.
Would make sense to add the definition to others as well.https://develop.openfoam.com/Development/openfoam/-/issues/1200Function1::New input checking2020-01-08T14:49:38ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comFunction1::New input checking### Summary
Function1::New produces not very good error messages if the dictionary entry does not exist.### Summary
Function1::New produces not very good error messages if the dictionary entry does not exist.Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/2223Function1 table searches for wildcard for 'interpolationScheme'2021-12-23T17:49:11ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comFunction1 table searches for wildcard for 'interpolationScheme'<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be re...<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be rendered on the platform by using the
"preview" tab above
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
<!-- Summarize the bug encountered concisely -->
The `table` version of Function1 looks for the optional `interpolationScheme` entry. It also allows wildcard matching which does not make sense.
Probably there are lots of other places where wildcard matches are allowed that shouldn't.
### Steps to reproduce
<!-- How one can reproduce the issue - this is very important -->
Maybe a `uniformFixedValue` bc with a `table` `uniformValue` and an additional ".*" entry.
### Environment information
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v1806|v1812|v1906|v1912|v2006|v2012|v2106 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version : v2106https://develop.openfoam.com/Development/openfoam/-/issues/1686Function object "energySpectrum"2020-06-15T16:36:05ZSeo Dong-HoFunction object "energySpectrum"Hello
I have installed OpenFOAM v1812 into Ubuntu 16.04 LTS. OpenFOAM itself seemed to be working well (there was no problem with testing a "cavity" problem using icoFoam). I also tested a "Decay of homogeneous isotropic turbulence" tut...Hello
I have installed OpenFOAM v1812 into Ubuntu 16.04 LTS. OpenFOAM itself seemed to be working well (there was no problem with testing a "cavity" problem using icoFoam). I also tested a "Decay of homogeneous isotropic turbulence" tutorial as itself without any modification, but function object "energySpectrum" did not work. In fact, OpeFOAM did not generate a file "energySpectrum.dat" in each time directory even though other results seemed to be O.K.
I have already tried to do many things to fix it, but it did not work yet.
Your prompt assistance will be appreciated.
Thank you.https://develop.openfoam.com/Development/openfoam/-/issues/1685function object "energySpectrum"2020-04-21T09:36:10ZSeo Dong-Hofunction object "energySpectrum"https://develop.openfoam.com/Development/openfoam/-/issues/1987FunctionObject from foamNewFunctionObject does not compile2021-01-26T20:22:11ZHenning ScheuflerFunctionObject from foamNewFunctionObject does not compile<!--
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
functionObject generated by the utility foamNewFunctionObject does not compile
### Environment information
- OpenF...<!--
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
functionObject generated by the utility foamNewFunctionObject does not compile
### Environment information
- OpenFOAM version : of2006,of2012,ofdev
- Operating system : ubuntu
- Hardware info :
- Compiler : gcc
### Possible fixes
error in following line:
```
boolData_(dict.getOrDefault<bool>("boolData"), true),
```
replace with
```
boolData_(dict.getOrDefault<bool>("boolData", true)),
```https://develop.openfoam.com/Development/openfoam/-/issues/2121functionObject momentum doesn't write into time folders2021-07-05T13:56:46ZJani SandgrenfunctionObject momentum doesn't write into time folders<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be re...<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be rendered on the platform by using the
"preview" tab above
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
<!-- Summarize the bug encountered concisely -->
The momentum function object (in OpenFOAM ESI version) does not write anything into the time folders. Only a .dat file in the postProcessing folder. However, when looking at the code it should be writing the momentum into time folders. Also, when using the cylindrical coordinate system of the momentum function object with a tutorial "cavity" it causes a segmentation fault. The simulation was done using OpenFOAM v2006.
### Steps to reproduce
<!-- How one can reproduce the issue - this is very important -->
Copy tutorial case /incompressible/pisoFoam/RAS/cavity.
Run it using ./Allrun.
Now check the time folders.
To produce the segmentation fault:
Change the option cylindrical from false to true.
(optionally the cylinder can also be defined according to https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-field-momentum.html )
### Example case
<!--
If possible, please create a SMALL example and attach it to your report
If you are using an older version of OpenFOAM this will also determine
whether the bug has been fixed in a more recent version
-->
Example definition for the momentum function object.
![example_definition_of_momentum_fO](/uploads/9f187ece1e52a23c68e5ece45f24ee23/example_definition_of_momentum_fO.png)
### What is the current *bug* behaviour?
<!-- What actually happens -->
Explained above.
### What is the expected *correct* behavior?
<!-- What you should see instead -->
Should print data to time folders.
### Relevant logs and/or images
<!--
Paste any relevant logs - please use code blocks (```) to format console
output, logs, and code as it's very hard to read otherwise.
-->
This part does not seems to do anything because fieldPtr seems to always return false.
![momentum_write_part_fieldPtr](/uploads/44247b15bb5e1bd17906f1dfb48221ff/momentum_write_part_fieldPtr.png)
### Environment information
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v1806|v1812|v1906 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version : v2006
- Operating system : Linux Ubuntu
- Hardware info : -
- Compiler : -
### Possible fixes
<!--
If you can, link to the line of code that might be responsible for the
problem
The "/label ~bug" text is a gitlab flag that will add the "bug" label to this
issue
-->
The problem may be related to the lines 521 - 530. For some reason the scopedNames are not found.
This has also been tested using kivaTest tutorial where using the cylindrical coordinate system (cylindrical-->true) did not cause segmentation fault. It also wrote some data into the time folders but only the cyl_r, cyl_t, cyl_z files. Not the "momentum", "angularMomentum" and "angularVelocity". (The cyl_r etc are handled in rows 532 to 585 in the momentum function object's .C file)
Link to source code:
https://develop.openfoam.com/Development/openfoam/blob/OpenFOAM-v2012/src/functionObjects/field/momentum/momentum.CKutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/issues/408functionObjects/graphics has ./Allwmake but no ./Allwclean2018-05-29T05:39:48ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comfunctionObjects/graphics has ./Allwmake but no ./AllwcleanI have to manually remove platforms/linux64GccDPInt32Opt/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeCache.txt to re-build. Would be nice to have an ./Allwclean as well as ./AllwmakeI have to manually remove platforms/linux64GccDPInt32Opt/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeCache.txt to re-build. Would be nice to have an ./Allwclean as well as ./AllwmakeVersion v1706Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/488functionObjects - on-the-fly usage of cuttingPlane with ACMI.2017-06-29T20:12:21ZAdminfunctionObjects - on-the-fly usage of cuttingPlane with ACMI.functionObjects (cuttingPlane) used on the fly.
cuttingPlane seems to fail when using ACMI (and/or AMI?) with a pimpleDymFoam derived solver. Error message includes: "not implemented"... The issue should be reproducible with ACMI tutoria...functionObjects (cuttingPlane) used on the fly.
cuttingPlane seems to fail when using ACMI (and/or AMI?) with a pimpleDymFoam derived solver. Error message includes: "not implemented"... The issue should be reproducible with ACMI tutorial (extended to 3D).https://develop.openfoam.com/Development/openfoam/-/issues/3060[future request] snappyHexMesh: 'std::out_of_range' error2023-12-19T08:39:15ZAkira Azami[future request] snappyHexMesh: 'std::out_of_range' error### Summary
The following error occurred when testing on the supercomputer Fugaku Pre/Post node (large memory(6TB on board)).
\[error messages\] terminate called after throwing an instance of 'std::out_of_range' what(): stoi
It appear...### Summary
The following error occurred when testing on the supercomputer Fugaku Pre/Post node (large memory(6TB on board)).
\[error messages\] terminate called after throwing an instance of 'std::out_of_range' what(): stoi
It appears that the information on the size of the memory could not be expressed integer range.
### Example case
### Steps to reproduce
\[tutorials\] tutorials/incompressible/pisoFoam/LES/motorBike/motorBike (When snappyHexMesh is executed)
$ ./Allrun
### Environment information
- OpenFOAM version : v2306, v2212, etc
- Operating system : RHEL 8.6 (kernel 4.18.0-372)
- Hardware info : Intel Xeon Platinum 8280L (2.70GHz/28core)
- Compiler : icpc (ICC) 2021.10.0 20230609
### Possible fixes
Changing the stoi function in src/OSspecific/POSIX/memInfo/memInfo.C to the stol function will terminate successfully. This correction was found by Fugaku support staff.
```
diff -r 146727f129a6 -r b255d5d23e65 src/OSspecific/POSIX/memInfo/memInfo.C
--- a/OpenFOAM-v2306/src/OSspecific/POSIX/memInfo/memInfo.C Fri Sep 22 16:37:54 2023 +0900
+++ b/OpenFOAM-v2306/src/OSspecific/POSIX/memInfo/memInfo.C Fri Sep 22 16:46:00 2023 +0900
@@ -100,17 +100,17 @@
if (key == "VmPeak")
{
- peak_ = std::stoi(line.substr(delim+1));
+ peak_ = std::stol(line.substr(delim+1));
--nkeys;
}
else if (key == "VmSize")
{
- size_ = std::stoi(line.substr(delim+1));
+ size_ = std::stol(line.substr(delim+1));
--nkeys;
}
else if (key == "VmRSS")
{
- rss_ = std::stoi(line.substr(delim+1));
+ rss_ = std::stol(line.substr(delim+1));
--nkeys;
}
}
@@ -148,7 +148,7 @@
if (key == "MemFree")
{
- free_ = std::stoi(line.substr(delim+1));
+ free_ = std::stol(line.substr(delim+1));
--nkeys;
}
}
```Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/1281fv::convectionScheme does not accept all schemes2021-07-06T15:33:30ZAdminfv::convectionScheme does not accept all schemesThe reacting solvers like the combustion solvers, Lagrangian solvers or heat transfer solvers use a fv::convectionScheme object for the convection term of species mass fraction and energy instead of fvm::div:
https://develop.openfoam.co...The reacting solvers like the combustion solvers, Lagrangian solvers or heat transfer solvers use a fv::convectionScheme object for the convection term of species mass fraction and energy instead of fvm::div:
https://develop.openfoam.com/search?utf8=%E2%9C%93&search=fv%3A%3AconvectionScheme&group_id=&project_id=5&search_code=true&repository_ref=develop#L1
This prevents the use of certain discretization schemes like "linear". For example, in the $FOAM_TUTORIALS/combustion/reactingFoam/laminar/counterFlowFlame2D case, replace
div(phi,Yi_h) Gauss limitedLinear 1;
with
div(phi,Yi_h) Gauss linear;
The error will read:
--> FOAM FATAL IO ERROR:
Unknown discretisation scheme linear
Valid schemes are :
12
(
Gamma
MUSCL
Minmod
SuperBee
limitedCubic
limitedLimitedLinear
limitedLinear
limitedLinear01
multivariateIndependent
multivariateSelection
upwind
vanLeer
)
Is this the intended behavior? Having the ability to choose schemes like "linear" or "cubic" might be advantageous for very fine meshes or DNS-like simulations.
\## Reattaching the author to the issue ticket: @g3 ##https://develop.openfoam.com/Development/openfoam/-/issues/2176fvMatrix useImplicit2021-10-31T16:30:46ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comfvMatrix useImplicit<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be re...<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be rendered on the platform by using the
"preview" tab above
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
<!-- Summarize the bug encountered concisely -->
`fvMatrix<Type>::checkImplicit` checks for id > 0. Should be >= 0 since if patchField 0 is useImplicit can produce 0.
### Environment information
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v1806|v1812|v1906|v1912|v2006|v2012|v2106 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version : v2112
- Operating system :
- Hardware info :
- Compiler :Sergio FerrarisSergio Ferrarishttps://develop.openfoam.com/Development/openfoam/-/issues/2219fvMeshPrimitiveLduAddressing leaks memory2021-09-29T14:31:34ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comfvMeshPrimitiveLduAddressing leaks memory<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be re...<!--
*** Please read this first! ***
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label and check to see if it has already been reported
You can see how your report will be rendered on the platform by using the
"preview" tab above
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
<!-- Summarize the bug encountered concisely -->
fvMeshPrimitiveLduAddressing stores reference to lduSchedule
### Steps to reproduce
<!-- How one can reproduce the issue - this is very important -->
Not tried but probably run anything with 'scheduled' instead of 'nonBlocking'.
### Environment information
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v1806|v1812|v1906|v1912|v2006|v2012|v2106 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version : v2106Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/951fvMeshSubSet setLargeCellSubset is ambiguous2022-04-29T15:14:48ZMark OLESENfvMeshSubSet setLargeCellSubset is ambiguousMark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/765fvMotionSolvers not using fvOptions2018-09-17T09:49:32ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comfvMotionSolvers not using fvOptionsThis is quite useful to have internal (cell based) constraints, e.g.
[fvOptions](/uploads/4f90b3668aa719e42dae501ad51f9511/fvOptions)This is quite useful to have internal (cell based) constraints, e.g.
[fvOptions](/uploads/4f90b3668aa719e42dae501ad51f9511/fvOptions)Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/1051fvOption for pressure2020-03-13T13:43:00ZMark OLESENfvOption for pressure- currently not possible, but could be useful for misc things like debugging matrix coefficients- currently not possible, but could be useful for misc things like debugging matrix coefficientsAndrew HeatherAndrew Heather