CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   spliting the domain (https://www.cfd-online.com/Forums/openfoam/132771-spliting-domain.html)

REJISH April 6, 2014 04:58

spliting the domain
 
1 Attachment(s)
HI Dear Friends,

I am new to OpenFOAM, I just mesh the airfoil with the circular domain using Construct2D mesh tool specially for 2d airfoil meshing purpose.
* the output of my mesh is in .p3d format
* I viewed my mesh in Parafoam it has four patches
auto0-airfoil
auto 1-front face,
auto2-back face
auto3-the outer circular domain
* but now, to give the boundary condition I need to split the circular domain into two for giving input and output boundary condition.
* How can I split this auto3 patch into two equal patch for giving inlet and outlet condition.
* I have attached my mesh view in paraFoam
* I want to finish this ASAP. Thanks for your help. I am new to Open foam so any kind of help is more useful for me.

fumiya April 12, 2014 12:54

Hi,

First, you can create the two sets from the auto3 patch
using the setSet(http://openfoamwiki.net/index.php/SetSet) utility
and then make the split patches from the sets using the createPatch utility.

The settings of createPatch is described in the createPatchDict file
(sample: https://github.com/OpenFOAM/OpenFOAM...reatePatchDict).

Hope this helps,
Fumiya

REJISH April 13, 2014 23:08

HI

Thanks for your help.

I am new to openFoam. Could you plz tell me how to create set from auto3patch..?

I don't know what is the action or criteria to proceed to do this...I have tried a lot with the information your are provided but i got only fatal error because I dont know how to proceed correctly with that.....

fumiya April 14, 2014 08:42

1 Attachment(s)
Hi REJISH,

You might want to try the followings:

Code:

$ setSet
readline> faceSet f0 new patchToFace auto3
readline> faceSet auto3_1 new faceToFace f0
readline> faceSet auto3_1 subset boxToFace (x1 y1 z1) (x2 y2 z2)

readline> faceSet auto3_2 new faceToFace f0
readline> faceSet auto3_2 subset boxToFace (x3 y3 z3) (x4 y4 z4)

According to the above procedure, you can create two sets auto3_1 and auto3_2 from auto3 patch.
The points (xi yi zi)(i=1,2,3,4) define the bounding boxes so find and use appropriate values for your geometry.

Then you can make the split pathes from created sets using the createPatch utility.
The settings are described in the system/createPatchDict file(sample: https://github.com/OpenFOAM/OpenFOAM...reatePatchDict).

Hope this helps,
Fumiya

REJISH April 15, 2014 23:47

HI Fumiya,

Thank a lot...its really helpful..

from your suggestion I created two sets using the coordinates for bounding boxes

radius of my domain is 15 and my chord is 1. and z axis extrusion is 0.01

so based on that i used this coordinates..correct me if I am wrong...

x1 y1 z1 = -20,15,-1.5
x2 y2 z2 = 0,-15,1.5
x3y3z3 = 0,15,-1.5
x4y4z4= 20,-15,1.5

in creatpatch utility i used this lines only..is this correct...where can i place this file system directory or constant ?

what should I do after i created this file....? do i need to give any command to execute this file...???

{
name inlet; // Type of new patch dictionary
{
type patch;
}
constructFrom set; patches ();
set auto3_1;
}
{
name outlet;
// Type of new patch dictionary
{
type patch;
}

constructFrom set;
patches ();
set auto3_2;
}

Thanks for your help

regards,
REJISH

REJISH April 16, 2014 00:04

HI fumiya,

after I created the set using the above procedure the VTK directory is created in my case directory with three additional auto3_1 ,auto3_1 and f0 directory on it...

is this correct..???
I placed createpatchdict in system folder and execute the command createPatch in the command line...but i got following error....
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Reading createPatchDict

Adding new patch inlet as patch 5 from
{
type patch;
}

Adding new patch outlet as patch 6 from
{
type patch;
}




--> FOAM FATAL ERROR:
Cannot find directory "polyMesh/sets" in times 0 down to constant

From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
in file db/Time/findInstance.C at line 142.

FOAM exit
could you please tell me did I miss anything..???

fumiya April 16, 2014 05:23

1 Attachment(s)
Hi REJISH,

Yes. The VTK directory is created after creating a set using the setSet utility.

Is the directory constant/polyMesh/sets created?
Are there auto3_1 and auto3_2 files in it?

You can visually check the created sets using ParaFoam(See attached picture: "Include Sets" option).

Best Regards,
Fumiya

REJISH April 16, 2014 07:24

Hi fumiya

Yes all the directories are created as you mentioned. but I dont know whether my coordinates which i mentioned above is correct or not...????

fumiya April 16, 2014 08:32

Hi,

I think your settings are ok if you want to split the patch by Y-Z plane.

As I wrote above, you can check if the sets are created as you expected by ParaView.

If the sets are correctly generated, all you have to do is to use createPatch properly.

Hope this helps,
Fumiya

REJISH April 16, 2014 09:09

Finally I got the solution....Thanks a lot Fumiya....its really helps a lot.....thank you very much.....it is executed well..........initially I made a error in the coordinates later I found that......thank you very much...


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