CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   labelToCell - Read cellIDs from an external file. (https://www.cfd-online.com/Forums/openfoam-pre-processing/121056-labeltocell-read-cellids-external-file.html)

HakikiCanakkaleli July 20, 2013 07:03

labelToCell - Read cellIDs from an external file.
 
Hi

== 1 ==
I would like to kindly ask whether reading a list of numbers from an external file with topoSet - labelToCell is possible or not.

== 2 ==
I have "topoSetDict" under "system" directory:

Code:

actions
(
{
        name    topoSetCellIDs;
        type    cellSet;
        action  new;
        source  labelToCell;
        sourceInfo
        {
          value  (100 101 102 103);
        }
        }

Whilst the "value"s are the "cellID"s.

== 2 ==
I have an external txt file (say "output.txt") in which purely the numbers were written:

Code:

100
101
102
103

== 3 ==
The question is whether these numbers can be read by "value (* * * *)" in the topoSetDict.

I appreciate any help.

Many thanks in advance.

HakikiCanakkaleli July 20, 2013 07:08

For example:

== 4 ==
When I write
Code:

value  ("output.txt");
The following error pops up:

Code:

--> FOAM FATAL IO ERROR:
wrong token type - expected int, found on line 30 the word 'output.txt'



All times are GMT -4. The time now is 18:11.