View Issue Details

IDProjectCategoryView StatusLast Update
0002158OpenFOAMBugpublic2016-07-22 09:58
Reporterhk318i Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Summary0002158: icoFoam + forces functionObject
DescriptionIf forces functionObject is added to controlDict with icoFoam, the following error appear. This error doesn't appear with other solvers like pisoFoam.

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 21 the punctuation token '['

file: constant/transportProperties.nu at line 21.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&)
    in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting
Steps To ReproduceAdd a functionObject to calculate the forces or forces coefficient acting on the movingWall patch in the cavity tutorial (icoFoam).
Additional InformationThis error is minor, it can be eliminated by fully specifying ``nu`` in constant/transportProperties as:
nu nu [0 2 -1 0 0 0 0] 1e-5;

But that is the old style which was modified by this commit https://github.com/OpenFOAM/OpenFOAM-dev/commit/50a2e36cf84d46ec76f3f73602d12dc10b9b92e5

I tracked the error in forces class, the problem is that icoFoam reads ``nu`` directly instead of initialising the transportModel, therefore the forces library reads ``nu`` form the transportProperties dictionary (lines 289 to 296 in forces class 'dev').

Apart from using the old style, there are few possible solutions. It could be solved by modifying the constructor of dimensionedType class or just modifying line 294 in forces class to read ``nu`` as in icoFoam. I'm not sure if this problem limited to the forces class or not.

Best wishes,
Hassan
TagsNo tags attached.

Activities

henry

2016-07-22 09:35

manager   ~0006550

icoFoam is purely a demostration and teaching solver to help people to understand the implementation of the PISO algorithm. It does not support all functionObjects or fvOptions as this would add clutter which detracts from the purpose of the solver.

For serious simulations please use pisoFoam or pimpleFoam and select the laminar turbulence model which provides all the functionality of icoFoam and much more including general transport modelling, fvOptions and all appropriate functionObjects.

The issues with the generality of icoFoam has been reported before and there seems to be a general missunderstanding of the purpose of this solver. If icoFoam causes much more confusion it could be removed altogether and pisoFoam used instead.

henry

2016-07-22 09:58

manager   ~0006551

> It could be solved by modifying the constructor of dimensionedType class or just modifying line 294 in forces class to read ``nu`` as in icoFoam.

I agree that this should be consistent:

OpenFOAM-dev: commit 02c9367deeafe34bebc43bbd2779854f1770843b
OpenFOAM-4.x: commit 5a27ec701cebee4799050278452df8db511f212b

Issue History

Date Modified Username Field Change
2016-07-22 09:22 hk318i New Issue
2016-07-22 09:35 henry Note Added: 0006550
2016-07-22 09:35 henry Status new => closed
2016-07-22 09:35 henry Assigned To => henry
2016-07-22 09:35 henry Resolution open => no change required
2016-07-22 09:58 henry Note Added: 0006551