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/)
-   -   Nonuniform initial condition using cellSetDict (http://www.cfd-online.com/Forums/openfoam-solving/58444-nonuniform-initial-condition-using-cellsetdict.html)

rinao August 24, 2008 09:13

Hi, I'm trying to set diffe
 
Hi,

I'm trying to set different initial conditions for a set of cells. In the interFoam example, the boxToCell rule was used, hoewver, in my problem the boundary is not rectangular but rather circular.

What are the exact command lines that I should write in the setCellDict?
Should I specify each cell explicitly?

Thanks,

Rina

rinao October 22, 2008 04:46

Hi Kathrin, Thanks for your m
 
Hi Kathrin,
Thanks for your mail.
I have another question: if the blocks have a cyclic side, which command should I use? The code that you sent is for a sphere, which is not the case for me. The block has 3 straight lines and one is cyclic. How should I write the initial conditions?

Thanks again,

Rina

isabel June 22, 2009 06:31

I am changing the interFoam tutorial to define a sphere of ratio 1 as initial condition. Does anybody know the error in this setFieldsDict file?






FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


defaultFieldValues
(
volScalarFieldValue gamma 0
volVectorFieldValue U (0 0 0)
);


regions
(
sphereToCell
{
sphere (0 0 0) (0 0 1);


fieldValues
(
volScalarFieldValue gamma 1
);
}
);


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

Markus_S November 26, 2009 09:03

Answer
 
Correct is that syntax:


sphereToCell
{
centre (0.02 0.135 0);
radius 0.01;
fieldValues
(
volScalarFieldValue gamma 1
);
}

marzbali November 9, 2011 12:30

Hello all,

does sphereToCell work the same way in 2D axisymmetric cases? The thing is that i want to patch a droplet with this syntax in setFieldsDict, but I get a cylinder instead of a droplet!! I tried funky function and cellSetDict but I got the same cylinder.

Any help is greatly appreciated, thank you.
Marzbali

hossein_y62 January 8, 2013 13:53

Hi every body,
could somebody help me to set an elliptic drop instead?
thanx

danvica January 9, 2013 01:42

I've never use it but funkySetFields should work.

See http://openfoamwiki.net/index.php/Co...funkySetFields example at point 5.

In 3D you can use the ellipsoid equation http://en.wikipedia.org/wiki/Ellipsoid

Regards,


All times are GMT -4. The time now is 13:24.