View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003343 | OpenFOAM | Bug | public | 2019-09-04 12:14 | 2019-09-05 09:35 |
Reporter | handrake0724 | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Arch | OS Version | (please specify) |
Summary | 0003343: oldCellCentre calling error when using sets functionObject | ||||
Description | In order to monitoring surface elevation in DTBHullMoving case, I have set functionObject in controlDict as follows: functions { surfaceElevation { type sets; libs ("libsampling.so"); writeControl timeStep; writeInterval 1; interpolationScheme cellPointFace; setFormat gnuplot; fields (alpha.water); sets ( gauge0 { type lineUniform; // uniform; axis z; start (0 -10 -1); end (0 -10 1); nPoints 100; } ); } } when the DTCHull case run with interFoam, I met the following error --> FOAM FATAL ERROR: Old cell centres have not been stored From function virtual const pointField& Foam::polyMesh::oldCellCentres() const in file meshes/polyMesh/polyMesh.C at line 1210. I found that oldCellCentres() member function and oldCellCentresPtr_ memeber variable was introduced since OpenFOAM 7 Also, I found that it looks working if the dynamicFvMesh type is staticFvMesh but it make the above error if dynamicMotionSolverFvMesh. I could not go further to study the issue but it looks like oldCellCentresPtr_ is assigned in movePoints when storeOldCellCentres_ is true. but storeOldCellCentres_ is set to true but make error since oldCellCentresPtr_ is empty in oldCellCentres() member function as follows: const Foam::pointField& Foam::polyMesh::oldCellCentres() const { storeOldCellCentres_ = true; if (!moving_) { return cellCentres(); } if (oldCellCentresPtr_.empty()) { FatalErrorInFunction << "Old cell centres have not been stored" << exit(FatalError); } return oldCellCentresPtr_(); } Please check this issue. | ||||
Tags | No tags attached. | ||||
|
Thanks for the report. Fixed in version 7 and in dev by the following commits: https://github.com/OpenFOAM/OpenFOAM-7/commit/49b2b3b8b08220c76cf338903b1f21089fa17c56 https://github.com/OpenFOAM/OpenFOAM-dev/commit/0f5fbb7ab16cfa447c54cd65b54cf7979049b257 |