|
[Sponsors] |
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: 13 |
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. 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: 29 |
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(); |
|
May 7, 2013, 03:05 |
|
#3 |
New Member
Pedro Pastilha
Join Date: Mar 2013
Location: Madrid
Posts: 3
Rep Power: 13 |
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(); Cheers, Pedro |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |
[DesignModeler] DM's JScript: FPoint()'s GetPoint(i) function picks points backwards? | ANT | ANSYS Meshing & Geometry | 2 | July 23, 2012 15:25 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 06:18 |
Boundary condition ambiguous at edge vertices | Matthias Stripf | Main CFD Forum | 6 | January 13, 2001 02:07 |