# get edge points for inlet boundary condition

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

 May 6, 2013, 03:55 get edge points for inlet boundary condition #1 New Member     Pedro Pastilha Join Date: Mar 2013 Location: Madrid Posts: 3 Rep Power: 6 Hi, I am trying to implement an inlet boundary condition in which the velocity changes accordingly to the distance to the wall. Ideally I would like to have it change differentely with each of the edges of my inlet condition (assuming a square inlet face). The approach I had in mind was to collect all the points corresponding to the edge of my boundary condition, and then loop through each internal point of the face, finding its distance to the edges by intersecting a normal vector with the edge point list. And this is where I have hit a wall, I cannot seem to get the edge point list for my boundary condition, I thought it would be something along the lines of: Code: ``` const vectorField& c = patch().Cf(); // boundary face's cell centers const vectorField& e1 = patch().edges(); // Idea 1 for the boundary edge points const vectorField& e2 = patch().Sf(); // Idea 2 - saw somewhere that this would give cell centers and edge points...but to no avail.``` Perhaps I am not considering the right approach, any help on the matter would be very welcome. Thanks in advance, Pedro

 May 6, 2013, 04:15 #2 Super Moderator     Niklas Nordin Join Date: Mar 2009 Location: Stockholm, Sweden Posts: 693 Rep Power: 22 Code: ``` const polyBoundaryMesh& patches = mesh.boundaryMesh(); label id = mesh.boundaryMesh().findPatchID(name); const labelList& addr = patches[id].meshPoints(); const vectorField& bSf = patches[id].faceNormals(); const edgeList& edges = patches[id].edges(); const labelListList& ef = patches[id].edgeFaces();``` hua1015 likes this.

 May 7, 2013, 03:05 #3 New Member     Pedro Pastilha Join Date: Mar 2013 Location: Madrid Posts: 3 Rep Power: 6 Thanks Niklas, I ended up implementing a slight variation of what you suggested, I found my boundary mesh through my BC's fvPatch patch() as I did not have the mesh explicitly defined in my boundary condition. It does seem to work ok for what I need. Code: ``` label id = patch().boundaryMesh().findPatchID("terrain_patch0"); const polyPatch& b = patch().boundaryMesh()[id].patch(); const vectorField& bc = b.faceCentres();``` Thanks once again for the help. Cheers, Pedro

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hinca CFX 15 January 26, 2014 18:11 volo87 CFX 5 June 14, 2013 17:44 ANT ANSYS Meshing & Geometry 2 July 23, 2012 15:25 Tudor Miron CFX 15 April 2, 2004 06:18 Matthias Stripf Main CFD Forum 6 January 13, 2001 03:07

All times are GMT -4. The time now is 00:15.