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/)
-   -   Using .setSet to periodically spawn droplets/spheres (https://www.cfd-online.com/Forums/openfoam-pre-processing/220805-using-setset-periodically-spawn-droplets-spheres.html)

F. Lang September 23, 2019 04:48

Using .setSet to periodically spawn droplets/spheres
 
Hello,

I want to periodically generate droplets, with an initial velocity, inside a wind tunnel and calculate the resulting velocity field.

To achieve this I tried to alter the injection-tutorial by using setSet to define a spherical cellZone, which I set as target for the selectionMode inside the fvOptions.

c0.setSet
Code:

cellSet c0 new
topoSetDict
Code:

actions
(
    {
        name    c0;
        type    cellSet;
        action  new;
        source  sphereToCell;
        sourceInfo
        {
            centre (0.075 0.2 0.05);
            radius 100e-4;
        }
    }
);

fvOptions
Code:

injector1
{
    timeStart      0.1;
    duration        5;
    selectionMode  cellZone;
    cellZone        c0; 
}

options
 {
 ...
 }

How ever I cannot understand how .setSet and topoSetDict interact with each other leading to the following error message:

Code:

--> FOAM FATAL ERROR:
Cannot find cellZone c0
Valid cellZones are 0()

    From function void Foam::fv::cellSetOption::setCellSet()
    in file cellSetOption/cellSetOption.C at line 142.

FOAM exiting

I cannot find any documentation regarding this in the OpenFoam documentation.As the sole tutorial using .setSet I found the damBreakWithObstacle, but struggle to adapt the method off generating the cellZone to my case.

Is there any documentation or tutorial explaining the usage of .setSet?

Thanks in advance.

F. Lang September 23, 2019 07:44

Found my mistake: I created a cellSet and tried to reference it as cellZone. In order to assign a cellZone you have to extend the topoSetDict as follws:
Code:

actions
 (
    {
        name    dropCellSet;
        type    cellSet;
        action  new;
        source  sphereToCell;
        sourceInfo
        {
            centre (0.075 0.2 0.05);
        radius 100e-4;
        }
    }
 
 
    {
        name    drop;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set dropCellSet;
        }
    }
 );

However, I still do not understand how .setSet and topoSetDict interact. Is the .setSet-file just another way to achieve what topoSet does via a bash-script?


All times are GMT -4. The time now is 20:19.