|
[Sponsors] |
A little help with compressibleInterFoam on OpenFoam2012 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 6, 2021, 18:34 |
A little help with compressibleInterFoam on OpenFoam2012
|
#1 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Hello to all,
I just compiled OpenFOAM v2012 in debug mode. I am trying to use compressibleInterFoam in a simple rectangle with (20 x 3 x 50)mm to simulate the filling of the plate with water and air. However, I am getting an error saying: Code:
--> FOAM FATAL ERROR: (openfoam-2012) Tensor is not invertible due to the zero determinant:det(Tensor) = 8e-20 From Foam::Tensor<Cmpt> Foam::inv(const Foam::Tensor<Cmpt>&, Cmpt) [with Cmpt = double] in file /home/pc/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/TensorI.H at line 738. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-v2012/src/OSspecific/POSIX/printStack/printStack.C:237 #1 Foam::error::exitOrAbort(int, bool) at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/error.C:262 #2 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/error.C:298 #3 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #4 Foam::Tensor<double> Foam::inv<double>(Foam::Tensor<double> const&, double) at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/TensorI.H:738 #5 Foam::Tensor<double> Foam::inv<double>(Foam::Tensor<double> const&) at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/TensorI.H:754 #6 Foam::inv(Foam::Field<Foam::Tensor<double> >&, Foam::UList<Foam::Tensor<double> > const&) at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/fields/Fields/tensorField/tensorField.C:106 (discriminator 3) #7 void Foam::inv<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #8 Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > Foam::inv<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #9 Foam::tmp<Foam::GeometricField<Foam::outerProduct<Foam::Vector<double>, double>::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::reconstruct<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #10 ? in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #11 ? in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam #12 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #13 ? in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Debug/bin/compressibleInterFoam Aborted (core dumped) Anyone had a similar problem? Thanks in advance |
|
February 7, 2021, 16:20 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
The difference is that v2012 has an extra guard (which doesn't exist in OF7) to prevent zero division errors in TensorI.H during tensor-inverse computations (`inv` function): Code:
#ifdef FULLDEBUG if (mag(dett) < SMALL) { FatalErrorInFunction << "Tensor is not invertible due to the zero determinant:" << "det(Tensor) = " << mag(dett) << abort(FatalError); } #endif return cof(t).T()/dett; - You can compile the code in Opt mode - We can relax the constraint from `SMALL` to `VSMALL`
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
February 8, 2021, 13:19 |
|
#3 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Changed `SMALL` to `VSMALL`and got the problem solved!
Thanks! |
|
October 7, 2021, 03:05 |
|
#4 | |
Member
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 49
Rep Power: 6 |
Quote:
I'm facing the same issue while running in debug mode. My solver is running without issues in regular mode but throws the same error as mentioned here while running in debug mode. I followed your suggestion and tried removing the line of code, tried relaxing the constraint from `SMALL` to `VSMALL, and even copied the corresponding segment of code from OF7's TensorI.H file and replaced that in my v2012's TensorI.H file and recompiled the code. But everytime, OpenFOAM throws the same error at me in debug mode. I go to the file location and check, the error line mentioned below is not even present in the header file. Please suggest what could be the issue. Code:
--> FOAM FATAL ERROR: (openfoam-2012) Tensor is not invertible due to the zero determinant:det(Tensor) = 6.5205e-29 From Foam::Tensor<Cmpt> Foam::inv(const Foam::Tensor<Cmpt>&, Cmpt) [with Cmpt = double] in file /opt/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/TensorI.H at line 738. Last edited by Venky_94; October 7, 2021 at 15:13. |
||
|
|