Development issueshttps://develop.openfoam.com/groups/Development/-/issues2019-11-08T07:11:42Zhttps://develop.openfoam.com/Development/openfoam/-/issues/1342GAMG uses hardcoded coarse-level solver2019-11-08T07:11:42ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comGAMG uses hardcoded coarse-level solver### Functionality to add/problem to solve
GAMG currently has two different methods for solving the coarsest level : direct or CG. It would be nice to override this behaviour
### Target audience
(Who will benefit from the changes?)
(W...### Functionality to add/problem to solve
GAMG currently has two different methods for solving the coarsest level : direct or CG. It would be nice to override this behaviour
### Target audience
(Who will benefit from the changes?)
(What type of cases?)
Parallel running
### Proposal
(How are we going to solve the problem?)
Allow specification of coarse-level solverMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/1311Foam::eigenValues wrong behaviour for complex eigenvalues2020-02-18T12:24:40ZJohan RoenbyFoam::eigenValues wrong behaviour for complex eigenvaluesThe Foam::eigenValues(const tensor&) function sets an eigenvalue to 0 if it is complex:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/src/OpenFOAM/primitives/Tensor/tensor/tensor.C#L105
This is fundamentally flawe...The Foam::eigenValues(const tensor&) function sets an eigenvalue to 0 if it is complex:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/src/OpenFOAM/primitives/Tensor/tensor/tensor.C#L105
This is fundamentally flawed behaviour.
It should either return the complex eigenvalue or a FatalError.
I suggest a reimplementation of Foam::eigenValues which does not use cubicEqn::roots.
See e.g. [here](https://en.wikipedia.org/wiki/Eigenvalue_algorithm#3%C3%973_matrices)v2006Kutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/issues/124BUG: inconsistent argument specification- surface* utilities2016-06-13T12:19:12ZPrashant SonakarBUG: inconsistent argument specification- surface* utilitiesThe input argument specification, specifically triSurface geometry is inconsistent
```
surfaceAdd constant/triSurface/a.stl constant/triSurface/b.stl
surfaceBooleanFeatures union a.stl b.stl
```
@Mattijs The input argument specification, specifically triSurface geometry is inconsistent
```
surfaceAdd constant/triSurface/a.stl constant/triSurface/b.stl
surfaceBooleanFeatures union a.stl b.stl
```
@Mattijs AdminAdminhttps://develop.openfoam.com/Development/openfoam/-/issues/1374distance surfaces has gaps in mesh2020-06-19T14:37:28ZMark OLESENdistance surfaces has gaps in meshcross-ref EP1041cross-ref EP1041Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/1464nearWallFields does not produce correct sampling location2019-12-23T14:53:36ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comnearWallFields does not produce correct sampling location<!--
*** 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 ...<!--
*** 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 -->
nearWallFields uses mappedPatchBase::facePoint to find a starting location which is on a tet-face when using the FACE_DIAG cell decomposition. Even on e.g. pitzDaily this might not find a point for all wall faces. Run e.g. nearWallFields with
```
type nearWallFields;
fields
(
(U UNear)
);
// Patches/groups to sample (regular expressions)
patches (wall);
// Distance to sample
distance 0.00001;
```
the fourth face on the top-wall is not found correctly and it falls back to the cell centre.
2) the destination for tracking is calculated from the fall-back cell centre in above case instead of the wanted location on the wall face.
See the UNear on the top-wall. Above tiny distance (0.00001) should produce near-zero.
![topWall](/uploads/b303ab599ba14ba04a2e14c2341252ae/topWall.png)https://develop.openfoam.com/Development/openfoam/-/issues/1048blockMesh do not work properly when using OF WSL installation2020-03-13T13:42:02ZAdminblockMesh do not work properly when using OF WSL installation1. Install openfoam windows 10 native, following official instructions.
2. Copy pipeCylic tutorial.
3. Run ./Allrun.
Not expected: all commands are executed quickly but no results are generated.
4. Run blockMesh manually.
Not expected: e...1. Install openfoam windows 10 native, following official instructions.
2. Copy pipeCylic tutorial.
3. Run ./Allrun.
Not expected: all commands are executed quickly but no results are generated.
4. Run blockMesh manually.
Not expected: error
krzychu@DESKTOP:/mnt/c/Users/Krzysiek/open/pipeCylic$ blockMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1806
Arch : "LSB;label=32;scalar=64"
Exec : blockMesh
Date : Oct 25 2018
Time : 13:57:03
Host : "DESKTOP"
PID : 2290
I/O : uncollated
Case : /mnt/c/Users/Krzysiek/open/pipeCylic
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Creating block mesh from
"/mnt/c/Users/Krzysiek/open/pipeCylic/system/blockMeshDict"
Using #calc at line 26 in file "/mnt/c/Users/Krzysiek/open/pipeCylic/system/blockMeshDict"
Using #codeStream with "/mnt/c/Users/Krzysiek/open/pipeCylic/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_2c1a7ee7b5369acae9da148f9823fdd8cde6256a.so"
Creating new library in "dynamicCode/_2c1a7ee7b5369acae9da148f9823fdd8cde6256a/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_2c1a7ee7b5369acae9da148f9823fdd8cde6256a.so"
Invoking wmake libso /mnt/c/Users/Krzysiek/open/pipeCylic/dynamicCode/_2c1a7ee7b5369acae9da148f9823fdd8cde6256a
wmake libso /mnt/c/Users/Krzysiek/open/pipeCylic/dynamicCode/_2c1a7ee7b5369acae9da148f9823fdd8cde6256a
ln: ./lnInclude
dep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
In file included from /opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/bits/uniform_int_dist.h:35:0,
from /opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/bits/stl_algo.h:66,
from /opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/algorithm:62,
from /opt/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/keyTypeI.H:26,
from /opt/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/keyType.H:178,
from /opt/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/entry.H:44,
from /opt/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/dictionary.H:88,
from codeStreamTemplate.C:29:
/opt/OpenFOAM/ThirdParty-v1806/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/limits:1601:7: internal compiler error: Illegal instruction
max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
^~~
0xac5ddf crash_signal
/home/pgh/OpenFOAM/ThirdParty-1706/gcc-6.3.0/gcc/toplev.c:333
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
/opt/OpenFOAM/OpenFOAM-v1806/wmake/rules/General/transform:34: recipe for target 'Make/linux64Gcc63DPInt32Opt/codeStreamTemplate.o' failed
make: *** [Make/linux64Gcc63DPInt32Opt/codeStreamTemplate.o] Error 1
--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/_2c1a7ee7b5369acae9da148f9823fdd8cde6256a/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_2c1a7ee7b5369acae9da148f9823fdd8cde6256a.so"
file: /mnt/c/Users/Krzysiek/open/pipeCylic/system/blockMeshDict
From function static void (* Foam::functionEntries::codeStream::getFunction(const Foam::dictionary&, const Foam::dictionary&))(Foam::Ostream&, const Foam::dictionary&)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 220.
FOAM exiting
\#\# Reattaching the author to the issue ticket: @Krzysiek111 \#\#
https://develop.openfoam.com/Development/openfoam/-/issues/1466(wallBounded)streamLine FO does not do bi-directional tracking2020-01-08T14:30:57ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.com(wallBounded)streamLine FO does not do bi-directional tracking### Functionality to add/problem to solve
Add bi-directional tracking to streamlines.
### What does success look like, and how can we measure that?
Put e.g. seeds into recirculation zone and see if we can track back and forwards.### Functionality to add/problem to solve
Add bi-directional tracking to streamlines.
### What does success look like, and how can we measure that?
Put e.g. seeds into recirculation zone and see if we can track back and forwards.Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/1295extrudeToRegionMesh : adaptMesh - inconsistent boundary2023-12-07T19:05:01ZPrashant SonakarextrudeToRegionMesh : adaptMesh - inconsistent boundary<!--
*** 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
-->
<!--
All text between these marker...<!--
*** 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
-->
<!--
All text between these markers are comments and will not be present in the
report
-->
### Summary
EP#942 - extrudeToRegionMesh utility seem to leave inconsistent boundary definition when used with adaptMesh=true in parallel.
### What is the current *bug* behaviour?
Parallel: The extrusion utility completes, but the checkMesh has error
Serial : Both extrusion and checkMesh are successfully completed.
### 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 : v1812
### Possible fixes
<!--
If you can, link to the line of code that might be responsible for the
problem
-->
@Mattijs @markhttps://develop.openfoam.com/Development/openfoam/-/issues/958checkMesh does not output ACMI mask field2018-10-09T08:53:11ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comcheckMesh does not output ACMI mask fieldMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/596sampling with plane (cuttingPlane) produces excessive warning messages.2017-12-18T05:23:49ZMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comsampling with plane (cuttingPlane) produces excessive warning messages.It will print "Did not find closed walk .."
and then a list of 1001 numbers.It will print "Did not find closed walk .."
and then a list of 1001 numbers.Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/71BUG: Disallow advectionDiffusion method within advectionDiffusionCoeffs for w...2023-12-07T19:05:03ZPrashant SonakarBUG: Disallow advectionDiffusion method within advectionDiffusionCoeffs for wallDistThe example illustrates the recursive problem
[pitzDaily_wallDist_issue.tgz](/uploads/9faed6aa0ef7e815bd894d71addf2528/pitzDaily_wallDist_issue.tgz)
```
wallDist
{
method advectionDiffusion; //meshWave, advectionDiffusion, Poi...The example illustrates the recursive problem
[pitzDaily_wallDist_issue.tgz](/uploads/9faed6aa0ef7e815bd894d71addf2528/pitzDaily_wallDist_issue.tgz)
```
wallDist
{
method advectionDiffusion; //meshWave, advectionDiffusion, Poisson
nRequired yes;
advectionDiffusionCoeffs
{
method advectionDiffusion; //Disallow this!
}
}
```
@Sergio @Mattijs Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/issues/1465turbulentDFSEMInlet for LES imulation for naca0012 aerofoil2019-12-12T08:26:59ZAdminturbulentDFSEMInlet for LES imulation for naca0012 aerofoil<!--
*** 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 ...<!--
*** 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
I am trying to use turbulentDFSEMInlet at the inlet for simulation flow over aerofoil (The domain is attached below
domain size ( 5c upstream, 10 c downstream and spanwise 0.1 c ) c is the chord length (c=0.3048 m) and in the log file at the first time step only 5 eddies are generated at the inlet as shown below
`starting time loop
Courant Number mean: 0.000449944 max: 0.0468918
deltaT = 1.2e-07
Time = 1.2e-07
PIMPLE: iteration 1
**Turbulent DFSEM patch: inlet seeded 5 eddies with total volume 0.0519412**
smoothSolver: Solving for Ux, Initial residual = 3.70186e-06, Final residual = 5.58285e-09, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 2.02752e-06, Final residual = 7.27509e-08, No Iterations 1
smoothSolver: Solving for Uz, Initial residual = 0.000726498, Final residual = 8.2538e-08, No Iterations 1
GAMG: Solving for p, Initial residual = 0.999923, Final residual = 1.86291, No Iterations 1000
GAMG: Solving for p, Initial residual = 0.0407024, Final residual = 0.0142608, No Iterations 1000
time step continuity errors : sum local = 9.09561e-07, global = -1.32729e-08, cumulative = -1.32729e-08
GAMG: Solving for p, Initial residual = 0.0149751, Final residual = 0.00549751, No Iterations 1000
GAMG: Solving for p, Initial residual = 0.0055067, Final residual = 0.00168609, No Iterations 1000
time step continuity errors : sum local = 1.49201e-07, global = -4.97451e-09, cumulative = -1.82474e-08`
### Steps to reproduce
**boundary conditions**
`/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform ( 71.3 0 0 );
boundaryField
{
aerofoil
{
type fixedValue;
value uniform ( 0 0 0 );
}
top
{
type symmetryPlane;
}
bottom
{
type symmetryPlane;
}
front
{
type cyclic;
}
back
{
type cyclic;
}
inlet
{
type turbulentDFSEMInlet;
delta 2;
nCellPerEddy 3;
mapMethod nearestCell;
R uniform (0.5 0 0 0.5 0 0.5);
U uniform (71.3 0 0);
L uniform 0.055;
value $internalField;
}
outlet
{
type freestream;
freestreamValue uniform (71.3 0 0);
value uniform (71.3 0 0);
}
}
// ************************************************************************* //`
`
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType LES;
LES
{
LESModel kEqn;
turbulence on;
printCoeffs on;
delta vanDriest;
vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
Aplus 26;
Cdelta 0.158;
}
}
// ************************************************************************* //`
### 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
-->
### What is the current *bug* behaviour?
only 5 eddies are generated at the inlet and inlet velocity higher than average specified velocity as shown in the attached picture (velocity inlet=113 although the Umean=71.3 m/s)
![Capture](/uploads/15f090f2c4897ce376acd3550064832d/Capture.JPG)![Capture1](/uploads/98ff8a5078c628de6df3a034dc79a67c/Capture1.JPG)
### What is the expected *correct* behavior?
<expected higher numbers of eddies are generated at the inlet with umean=71.3 m/s
### 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 : v1806|v1812|v1906 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc
-->
- OpenFOAM version :1906
- Operating system :ubuntu 15.04
- 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
-->
\## Reattaching the author to the issue ticket: @zein.elserfy ##Kutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/issues/1454postProcess clears pointer (to output file) when mesh moved during the simula...2019-10-16T12:15:53ZAdminpostProcess clears pointer (to output file) when mesh moved during the simulationThe "guilty" code is in the file postProcess.H, around line 175 (depending on your version):
```
if (mesh.readUpdate() != polyMesh::UNCHANGED)
{
// Update functionObjects if mesh changes
// Note c...The "guilty" code is in the file postProcess.H, around line 175 (depending on your version):
```
if (mesh.readUpdate() != polyMesh::UNCHANGED)
{
// Update functionObjects if mesh changes
// Note clearing the dictionary to avoid merge warning
functionsDict.clear();
functionsPtr = functionObjectList::New
(
args,
runTime,
functionsDict,
selectedFields
);
}
```
It actually destroys the pointer to the file used for output in the *postProcessing/xxx* directory and therefore makes it impossible to have more than two timesteps outputted there (the first, in the xxx.dat file and the last in the xxx_latestTime.dat file).
I got so far as to identify the source of my issue, can anyone suggest an alternative to destroying the whole functionsPtr when the mesh moves? My only realistic alternative as of now is to actually extract the desired data from the piped output date (ie Log).
Kind regards,
-Louishttps://develop.openfoam.com/Development/openfoam/-/issues/1500surfaceRedistributePar needs a dictionary2019-11-14T22:16:02ZAdminsurfaceRedistributePar needs a dictionary### Functionality to add/problem to solve
surfaceRedistributePar could benefit from having its own dictionary similar to decomposeParDict or surfaceFeatureExtractDict. That way we won't have to run the command line multiple times for mu...### Functionality to add/problem to solve
surfaceRedistributePar could benefit from having its own dictionary similar to decomposeParDict or surfaceFeatureExtractDict. That way we won't have to run the command line multiple times for multiple surfaces.
### Target audience
Anyone decomposing multiple surfaces
### Proposal
Have surfaceRedistributePar read a surfaceRedistributeParDict which has a list of surfaces and requires the distributionType to be listed for each surface (or use a global distributionType specified in this file).
### What does success look like, and how can we measure that?
When surfaceRedistributePar reads from a dictionary, I'll be happy.
### Funding
Nonehttps://develop.openfoam.com/Development/openfoam/-/issues/1124ENH: Warning/Error Message for Reynolds Stress Tensor Input - DFSEM2019-09-05T11:51:18ZKutalmış BerçinENH: Warning/Error Message for Reynolds Stress Tensor Input - DFSEM### Summary
DFSEM requires Reynolds stress tensor as input. Nonetheless, the tensor values need to be constrained in few ways in order to avoid *mathematical domain errors*, which is currently absent.
### Steps to reproduce
Assume a u...### Summary
DFSEM requires Reynolds stress tensor as input. Nonetheless, the tensor values need to be constrained in few ways in order to avoid *mathematical domain errors*, which is currently absent.
### Steps to reproduce
Assume a user inputs this: `R uniform (1 1 1 0.1 1 0.1);`
However, for example, R11*R22 - (R21)^2 > 0 should be held, which is negative with the particular setting above.
Consequently, the relevant case hangs at the outset of the first iteration without raising any warning/error message (Observed in v1712, v1806, and development-branch).
### What is the expected correct behavior?
The user should be accordingly informed, and directed to the correct usage with a warning message; and computation should be ceased.v1906Kutalmış BerçinKutalmış Berçinhttps://develop.openfoam.com/Development/openfoam/-/issues/224ENH: runTime calculation of (dp/dt)^22019-12-09T22:04:12ZPrashant SonakarENH: runTime calculation of (dp/dt)^2Feature request from EP#247
Enable calculation of (dp/dt)^2 as FO
@andyFeature request from EP#247
Enable calculation of (dp/dt)^2 as FO
@andyVersion v1612Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/533Request to modify directory name2019-12-09T22:11:26ZAdminRequest to modify directory nameCould you give the directory and its source file for the solver, e.g. interCondensatingEvaporatingFoam, the same name?Could you give the directory and its source file for the solver, e.g. interCondensatingEvaporatingFoam, the same name?https://develop.openfoam.com/Development/openfoam/-/issues/395HashPtrTable has problems with null pointers2018-05-29T05:39:48ZMark OLESENHashPtrTable has problems with null pointersOk to store null pointers in a HashPtrTable, but the copy operations cause issues.Ok to store null pointers in a HashPtrTable, but the copy operations cause issues.Version v1706Mark OLESENMark OLESENhttps://develop.openfoam.com/Development/openfoam/-/issues/1402Possible mistake in omega calculation in pyrolysisChemistryModel.C2019-08-22T15:17:45ZAdminPossible mistake in omega calculation in pyrolysisChemistryModel.CHi,
I was trying to use solidChemistry and pyrolysisChemistryModel in a solver, and I was getting weird results or runtime errors (undefined behavior) for a simple case where reactions took place in a solid medium! When I tracked down t...Hi,
I was trying to use solidChemistry and pyrolysisChemistryModel in a solver, and I was getting weird results or runtime errors (undefined behavior) for a simple case where reactions took place in a solid medium! When I tracked down the runtime error, I found that the problem arises from the line 267 of pyrolysisChemistryModel.C, where we have
const scalar exp = R.lhs()[si].exponent;
where we get strange values for the "exp" variable! If you take a look at the whole block of this code:
const label Nl = R.lhs().size();
for (label s=0; s<Nl; s++)
{
label si = R.lhs()[s].index;
const scalar exp = R.lhs()[si].exponent; // This is line 267, the problematic line IMO
kf *=
pow(c1[si]/Ys0_[si][celli], exp)
*(Ys0_[si][celli]);
}
return kf;
I believe the "si" at line 267, should be replaced by "s", so the new code should be:
const scalar exp = R.lhs()[s].exponent;
I tried this and it solved the problem in my code! Because as far as I understand, "s" is the species index in the R.lhs() (left hand side of the reaction) and "si" is the species index in the species list! In case it is not clear or it is not convincing, please take a look at the following reaction file as an example:
species
(
A
B
C
);
gaseousSpecies
(
D
E
F
);
reactions
{
reaction1
{
type irreversibleArrheniusSolidReaction;
reaction "B = C";
A 1.5e14;
beta 0;
Ta 23653.7493709109;
Tcrit 500;
}
}
So in this case, to calculate the omega of the reaction, "s" will be 0 but "si" will be 1! Therefore, trying to read R.lhs()[si].exponent leads to undefined behavior, because R.lhs() has a size of 1!
I tried to explain the problem as clear as I could, so sorry for the long post, and please let me know if there is still something missing.
Best regards,
Mortezahttps://develop.openfoam.com/Development/openfoam/-/issues/429Support dictionary scoping as lvalue2017-12-18T23:19:00ZMark OLESENSupport dictionary scoping as lvalueCurrently can use `${:subdict.name}` as rvalue substitution - using the `:` to denote an absolute location, but it is not possible to use this type of notation as a lvalue. For example `:subdict.name` as a name, since `:` is a punctuatio...Currently can use `${:subdict.name}` as rvalue substitution - using the `:` to denote an absolute location, but it is not possible to use this type of notation as a lvalue. For example `:subdict.name` as a name, since `:` is a punctuation token. It might be possible to add additional quoting etc, but could also make sense just to allow another character for denoting an absolute location. I would propose allowing `^` as an absolute position anchor. This is a one-line change in dictionary::lookupScopedEntryPtr()
if (keyword[0] == ':' || keyword[0] == '^')
Once this is in place, I could rework the `removeEntry` function entry to handle scoped names and eliminate the current restriction:
> The removal only occurs in the current context.
> Removing sub-entries or parent entries is not supported.
@andy @Mattijsv1712Mark OLESENMark OLESEN