View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003690 | OpenFOAM | Bug | public | 2021-06-29 16:03 | 2021-06-29 17:43 |
Reporter | fede | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Debian | OS Version | 9 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003690: engineTime-based solvers cannot run with the option -case | ||||
Description | The definition of the path of the engineGeometry file in engineTimeNew.C is not correct, if the solver has not launched in the $FOAM_CASE folder. Please find attached a patched version of the file (see line 41 of the file) that fixes this issue. Wish this helps. Kind regards, Federico | ||||
Steps To Reproduce | cd $FOAM_TUTORIALS/combustion/coldEngineFoam blockMesh -case freePiston coldEngineFoam -case freePiston OpenFOAM release used: OpenFOAM-dev, commit 10a6e7a46 | ||||
Tags | No tags attached. | ||||
|
engineTimeNew.C (2,567 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "engineTime.H" #include "IFstream.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::autoPtr<Foam::engineTime> Foam::engineTime::New ( const word& name, const fileName& rootPath, const fileName& caseName, const fileName& systemName, const fileName& constantName, const fileName& dictName ) { IFstream engineDictFile(rootPath/caseName/constantName/dictName); dictionary engineDict(engineDictFile); const word engineType ( engineDict.lookupOrDefault<word>("engineType", "crankConRod") ); Info<< "Selecting engine type " << engineType << endl; dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(engineType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorInFunction << "Unknown engine type " << engineType << nl << nl << "Valid engine types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return autoPtr<engineTime> ( cstrIter() ( name, rootPath, caseName, systemName, constantName, dictName ) ); } // ************************************************************************* // |
|
Have you tested your proposed change in parallel? |
|
you are right, I simply forgot. I fix the lines to make it work in serial and parallel and I send it back. Apologies |
|
Resolved by commit fbfbe79bcd3212f80ebbdd0d8b337fef7d367616 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-06-29 16:03 | fede | New Issue | |
2021-06-29 16:03 | fede | File Added: engineTimeNew.C | |
2021-06-29 16:38 | henry | Note Added: 0012071 | |
2021-06-29 17:10 | fede | Note Added: 0012072 | |
2021-06-29 17:43 | henry | Assigned To | => henry |
2021-06-29 17:43 | henry | Status | new => resolved |
2021-06-29 17:43 | henry | Resolution | open => fixed |
2021-06-29 17:43 | henry | Fixed in Version | => dev |
2021-06-29 17:43 | henry | Note Added: 0012073 |