CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Unknown topoSetSource type expressionToFace

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By letzel
  • 2 Post By letzel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2014, 10:34
Default Unknown topoSetSource type expressionToFace
  #1
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 13
letzel is on a distinguished road
Dear Foamers,

when I execute topoSet in my case directory, with this system/topoSetDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

libs (
         "libsampling.so"
     "libsimpleSwakFunctionObjects.so"
     "libswakFunctionObjects.so"
     "libgroovyBC.so"
     "libswakTopoSources.so"
     );  

actions
(
    {
        name    durchflussmesserFaces;
        type    faceSet;
        action  new;
        source  expressionToFace;
        sourceInfo
        {
            expression "fpos().z>17.9 && fpos().z<18.1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<62.55";
        }
    }
    {
        name    durchflussmesserFacesSlaveCells;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box    ( -100 -100 0 ) ( 100 100 18.0 );
        }
    }
 );

// ************************************************************************* //
I get the following error log:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.2-9240f8b967db
Exec   : /opt/openfoam222/platforms/linux64GccDPOpt/bin/topoSet
Date   : May 14 2014
Time   : 16:26:18
Host   : [...]
PID    : 31428
Case   : [...]
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0.2

Reading topoSetDict

Time = 0.2
    mesh not changed.
Created faceSet durchflussmesserFaces
    Applying source expressionToFace


--> FOAM FATAL ERROR: 
Unknown topoSetSource type expressionToFace

Valid topoSetSource types : 

43
(
boundaryToFace
boxToCell
boxToFace
boxToPoint
cellToCell
cellToFace
cellToPoint
cylinderAnnulusToCell
cylinderToCell
faceToCell
faceToFace
faceToPoint
faceZoneToCell
faceZoneToFaceZone
fieldToCell
labelToCell
labelToFace
labelToPoint
nbrToCell
nearestToCell
nearestToPoint
normalToFace
patchToFace
pointToCell
pointToFace
pointToPoint
regionToCell
regionToFace
rotatedBoxToCell
searchableSurfaceToFaceZone
setAndNormalToFaceZone
setToCellZone
setToFaceZone
setToPointZone
setsToFaceZone
shapeToCell
sphereToCell
surfaceToCell
surfaceToPoint
targetVolumeToCell
zoneToCell
zoneToFace
zoneToPoint
)


    From function topoSetSource::New(const word&, const polyMesh&, const dictionary&)
    in file sets/topoSetSource/topoSetSource.C at line 89.

FOAM exiting
This error message leaves me a bit puzzled, because I in my topoSetDict I explicitly load libswakTopoSources.so, and the syntax of my topoSetDict follows the swak example Examples\other\angledDuctImplicit\system\topoSetDi ct.

I would be grateful for any suggestions how to solve this error.

Cheers,
Marcus
letzel is offline   Reply With Quote

Old   May 15, 2014, 10:30
Default
  #2
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 13
letzel is on a distinguished road
...I'd like to solve this issue, so if you require more information from me that is not clear or missing from my first post, please let me know.

Thanks a lot in advance,
Marcus
letzel is offline   Reply With Quote

Old   May 16, 2014, 06:29
Default swak4foam: Parser Error for driver FieldValueExpressionDriver
  #3
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 13
letzel is on a distinguished road
Happy to report that the initial problem was solved by adding

Code:
libs (
     "libswakTopoSources.so"
     );
to system/controlDict. My thanks to Ganesh for this useful remark!

This was, however, followed by another error:

Code:
Created faceSet durchflussmesserFaces
    Applying source expressionToFace
    Adding all elements of for which "fpos().z>17.9 && fpos().z<18.1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<62.55" evaluates to true ...


--> FOAM FATAL ERROR: 
 Parser Error for driver FieldValueExpressionDriver at "1.10-13" :"syntax error, unexpected number"
"fpos().z>17.9 && fpos().z<18.1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<62.55"
           ^^^^
-----------|   

Context of the error:


- Driver constructed from scratch
  Evaluating expression "fpos().z>17.9 && fpos().z<18.1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<62.55"


    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 1081.

FOAM exiting
I understand that 17.9 (and 18.1) do not have the correct data type, but don't know how I have to convert them so that they can be compared to fpos().z.
xli1990 likes this.
letzel is offline   Reply With Quote

Old   May 16, 2014, 08:34
Default
  #4
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 13
letzel is on a distinguished road
Following this post (thanks, Bernhard!), I solved the my problem by applying interpolate() to 17.9, 18.1 and 62.55. The respective formula now reads:
Code:
expression "fpos().z>interpolate(17.9) && fpos().z<interpolate(18.1) && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<interpolate(62.55)";
elvis and xli1990 like this.
letzel is offline   Reply With Quote

Reply

Tags
swak4foam, toposetdict


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 16:14
Simulation of Radial Fan with simpleFoam MRF nash OpenFOAM Running, Solving & CFD 2 November 5, 2015 10:12
Thermal Comfort Simulation in STAR CCM+ anupmu STAR-CCM+ 1 February 27, 2013 14:25
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 15:46
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 15:56.