CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

select disk with faceSet

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 7, 2012, 10:20
Default select disk with faceSet
  #1
New Member
 
Join Date: May 2012
Location: France
Posts: 4
Rep Power: 5
raffale is on a distinguished road
Hi everyone,

This is my first thread but I already spent a lot of time to read yours threads. This forum is a blessing for every new user of Openfoam like me.

So this is my case, I want to simulate the landing of an helicopter in aerodynamic corridor disrupted by structures. I chose to model the rotors with actuator disks.

I used snappyHexMesh for create my Mesh (helicoptere without rotors + ground structures) and I use toposet and createBaffles to create my rotors. Then I use type fan BC for my rotors.

My problem: In my toposet I only know create rectangular rotor with these lines:
actions
(
{
name cyclicfanFaces;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (13 -1.5 9.4) (16 1.5 9.6);
}
}

{
name cyclicfanFacesSlaveCells;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (13 -1.5 9.5) (16 1.5 13);
}
}

{
name cyclicfanZoneFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet cyclicfanFaces;
cellSet cyclicfanFacesSlaveCells;
}
}


);

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


And I Want to select a DISK rotor, because a rotor is a disk. I think this problem is boxToFace in faceSet but I don't know what other faceSet keyword choose.
With CellSet we can use cylinderToCell but with faceSet it's not possible.

So have you suggestions to solve that simple but annoying problem.

Thanks ahead for your comments
Regards,
Cyril

PS: Don't hesitate to correct my english. I must improve my writing skills.
raffale is offline   Reply With Quote

Old   June 7, 2012, 11:08
Default
  #2
Senior Member
 
Join Date: Mar 2011
Posts: 174
Rep Power: 6
anon_a is on a distinguished road
If you take a look in

applications/utilities/mesh/manipulation/topoSet/topoSetDict

you can see various functions that you can use to select cells/faces/points.
Something that you could do perhaps is a cylinderToCell to select cells on both sides of the wanted faces and then cellToFace with the option "both".

Assuming off course that your faces are appropriately shaped and positioned to create a perfect disk.
anon_a is offline   Reply With Quote

Old   June 7, 2012, 15:24
Default
  #3
New Member
 
Join Date: May 2012
Location: France
Posts: 4
Rep Power: 5
raffale is on a distinguished road
Thanks for your reply anon_a, I'll take a look tomorrow.

After reading the post on the forum and after taking a look on the tutorial with "type fan BC"(Tjunctionfan), I found it strange that in these cases the actuator disk was modeled by a rectangular surface and never with disk.

What a pity that cylinderToFace doesn't exist in OpenFoam. This would be so much easier.

Regards,
Cyril
raffale is offline   Reply With Quote

Old   June 7, 2012, 17:37
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by raffale View Post
Thanks for your reply anon_a, I'll take a look tomorrow.

After reading the post on the forum and after taking a look on the tutorial with "type fan BC"(Tjunctionfan), I found it strange that in these cases the actuator disk was modeled by a rectangular surface and never with disk.

What a pity that cylinderToFace doesn't exist in OpenFoam. This would be so much easier.

Regards,
Cyril
At least you can spare yourself the trouble of programming your own topoSource with the expressionToFace topo-source that comes with swak4Foam. Something like

expression "mag(pos().z)<1 && sqrt(pow(pos().x,2)+ pow(pos().y,2))<1"

will select all faces on the boundary of a cylinder

expression "mag(fpos().z)<1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<1"

will select all faces INSIDE the cylinder
gschaider is offline   Reply With Quote

Old   June 8, 2012, 08:27
Default
  #5
New Member
 
Join Date: May 2012
Location: France
Posts: 4
Rep Power: 5
raffale is on a distinguished road
It works! Thanks for yours replies, it was helpful.

Here is my toposet if someone want to select a disk:



/*--------------------------------*- C++ -*----------------------------------*\

| ========= | |

| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |

| \\ / O peration | Version: 2.0.1 |

| \\ / A nd | Web: www.OpenFOAM.com |

| \\/ M anipulation | |

\*---------------------------------------------------------------------------*/

FoamFile

{

version 2.0;

format ascii;

class dictionary;

object topoSetDict;

}



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



actions

(

{

name c0;

type cellSet;

action new;

source cylinderToCell;

sourceInfo

{

//box (12.5 -2 9.5) (16 2 13);

p1 (14.5 0 9);

p2 (14.5 0 11);

radius 3.4;

}

}



{

name cyclicfanFaces;

type faceSet;

action new;

source cellToFace;

sourceInfo

{

set c0;

option both;

}

}



{

name c1;

type cellSet;

action new;

source cylinderToCell;

sourceInfo

{

//box (12.5 -2 9.5) (16 2 13);

p1 (14.5 0 10);

p2 (14.5 0 11);

radius 3.4;

}

}



{

name f1;

type faceSet;

action new;

source cellToFace;

sourceInfo

{

set c1;

option both;

}

}



{

name c2;

type cellSet;

action new;

source cylinderToCell;

sourceInfo

{

//box (12.5 -2 9.5) (16 2 13);

p1 (14.5 0 9);

p2 (14.5 0 10);

radius 3.4;

}

}



{

name f2;

type faceSet;

action new;

source cellToFace;

sourceInfo

{

set c2;

option both;

}

}



{

name cyclicfanFaces;

type faceSet;

action delete;

source faceToFace;

sourceInfo

{

set f1;

}

}



{

name cyclicfanFaces;

type faceSet;

action delete;

source faceToFace;

sourceInfo

{

set f2;

}

}

It's a succession of boolean operations.


Regards,
Cyril
raffale is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 8 July 3, 2014 10:54
actuator disk Atit CFX 8 November 6, 2013 06:10
Mass flow rate through faceSet using swak4foam CedricVH OpenFOAM 5 May 4, 2012 07:57
Actuator Disk Model sujialin CFX 0 April 18, 2010 16:29
Modelling an actuator disk in FLUENT teymourj Main CFD Forum 0 April 28, 2009 21:42


All times are GMT -4. The time now is 16:59.