CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Open Foam /Setfields (http://www.cfd-online.com/Forums/openfoam-solving/72187-open-foam-setfields.html)

moh1367 January 28, 2010 03:11

Open Foam /Setfields
 
Hi!
I want to use VOF solver and need to set the field in an exact manner. for example set in a circular region or other more complicated shapes. Can anyone help me?

gschaider January 28, 2010 14:51

Quote:

Originally Posted by moh1367 (Post 244008)
Hi!
I want to use VOF solver and need to set the field in an exact manner. for example set in a circular region or other more complicated shapes. Can anyone help me?

http://openfoamwiki.net/index.php/Co...funkySetFields would be a possibility. Or write your own custom utility for your application

moh1367 January 28, 2010 15:43

Thanks alot but can my reason satisfied simpler for example is there a substitution for ?Box to cell" in the Foam?

mu.e.nash March 22, 2012 07:09

there is a list for available types
Valid topoSetSource types :

39
(
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
rotatedBoxToCell
setToCellZone
setToFaceZone
setToPointZone
setsToFaceZone
shapeToCell
sphereToCell
surfaceToCell
surfaceToPoint
zoneToCell
zoneToFace
zoneToPoint
)

styleworker November 27, 2012 10:12

Two examples of selecting specific region & faces(setFieldsDict):

regions
(
/*cylinderToCell
{
p1 (0 0 -0.025); //Min
p2 (0 0 0.05); //Max
radius 0.098;

fieldValues
(
volScalarFieldValue alpha1 1
);
}*/
patchToFace
{
name sym1;
fieldValues
(
volScalarFieldValue alpha1 1
);
}


);

Tobi January 7, 2013 11:02

Hi all,

is it possible to set the cell values of alpha1 (i.e) to 1 in a given STL file?
Therefor I want to use the "surfaceToCell" method. Is that method for that ?

Thanks tobi

sandy13 October 7, 2015 05:08

Quote:

Originally Posted by Tobi (Post 400503)
Hi all,

is it possible to set the cell values of alpha1 (i.e) to 1 in a given STL file?
Therefor I want to use the "surfaceToCell" method. Is that method for that ?

Thanks tobi

Dear Tobi,
I am looking for the same thing you asked about.. did you find the answer for this question? can we import STL under a certain name and give it liquid properties and how to do the setting in setFields? if this possible.. do we need any extra dictionary to define?
Thanks in advance,
Sandy13,

roucho November 19, 2015 15:12

Hi Sandy,
I used this code as a setSet batch of commands, to define a porous region inside a tunnel:
Code:

pointSet tempSet new surfaceToPoint "./constant/triSurface/vehicles.stl" 0.1 true false
cellSet vehiclesSet new pointToCell tempSet any

pointSet tempSet remove
cellZoneSet vehiclesZone new setToCellZone vehiclesSet

Using the resulting cellZone (vehiclesZone) in setFields should be straightforward.
Happy FOAMing!

xoitx March 10, 2016 15:26

Quote:

Originally Posted by mu.e.nash (Post 350858)
there is a list for available types
Valid topoSetSource types :

39
(
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
rotatedBoxToCell
setToCellZone
setToFaceZone
setToPointZone
setsToFaceZone
shapeToCell
sphereToCell
surfaceToCell
surfaceToPoint
zoneToCell
zoneToFace
zoneToPoint
)

Where did you get this from and what do they mean? All of them are min max type?

dduque April 20, 2016 07:20

Quote:

Originally Posted by xoitx (Post 589059)
Where did you get this from and what do they mean? All of them are min max type?

It's easy to get this sort of output, simply type some impossible name on setFieldsDict (instead of, say, "boxToCell", type "which" or anything), and you will get this list. It works in all sorts of places, it's a convenient way to get the options of some parameter.


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