Hello friends,
Systems: Pop_OS! 22.04
G++ version: 11.2.0
I've encountered an IO error, when using interFoam in conjunction with the functionObject phaseScalarTransport in the debug-version of OpenFOAM 9.
I've modified the dambreak case found in tutorials/multiphase/interfoam/laminar/dambreak to contain an extra field C.water representing a small spot of a tracer concentration in the initial block of water. controlDict, fvSchemes, fvSolution and setFields have been modified accordingly.
damBreak.zip
Running the case in the release-version works fine, but running it in the debug-version crashes with the following error message:
/---------------------------------------------------------------------------
========= |
\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\ / O peration | Website: https://openfoam.org
\ / A nd | Version: 9
\/ M anipulation |
*---------------------------------------------------------------------------*/
Build : 9-2dfbc15bc6f1
Exec : interFoam
Date : Jul 01 2022
Time : 09:25:18
Host : "pop-os"
PID : 12418
I/O : uncollated
Case : /home/user1/openfoam-stuff/tutorials/multiphase/interFoam/laminar/damBreak/damBreak
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0
PIMPLE: No convergence criteria found
PIMPLE: Operating solver in transient mode with 1 outer corrector
PIMPLE: Operating solver in PISO mode
Reading field p_rgh
Reading field U
Reading/calculating face flux field phi
Reading transportProperties
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
No phase change: phaseChangeProperties not found
Selecting phaseChange model none
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
Reading g
Reading hRef
Calculating field g.h
No MRF models present
No fvModels present
No fvConstraints present
DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0
Starting time loop
--> FOAM FATAL IO ERROR:
error in IOstream "OSHA1stream.sinkFile_" for operation Ostream& operator<<(Ostream&, const word&)
file: OSHA1stream.sinkFile_ at line 0.
From function virtual bool Foam::IOstream::check(const char*) const
in file db/IOstreams/IOstreams/IOstream.C at line 96.
FOAM exiting
When the functionObject is not included (i.e. functions are commented out in the controlDict), the simulation runs fine.
I've already tried fully recompiling openfoam, including the latest updates via git pull
.
On my work machine, on which OpenFOAM 9 is compiled using G++ 9.4.0, the error doesn't occur. Neither in the debug-version nor in the release-version. I think it might be compiler-related, as there is a post regarding the same error on the archlinux repo forum (https://aur.archlinux.org/pkgbase/openfoam?O=230&PP=10 ), however, I'm not really satisfied with the solution.
To reproduce:
download the dambreak.zip and run the case with OpenFOAM 9, debug-version, compiled with G++ 11.2.0.