|
[Sponsors] |
March 14, 2012, 10:53 |
magSf() on boundaries
|
#1 |
New Member
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
Hi FOAMers,
how do I get magSf() on bounday faces? I noticed that mesh.magSf()[faceI] gives correct results on internal faces, but when faceI is on a face, it gives ~1e-320... Code:
label startFace = mesh.boundaryMesh()[ib].start(); label nFaces = mesh.boundaryMesh()[ib].size(); for (label faceI = startFace; faceI < startFace + nFaces; faceI++) { ... vector normal = mesh.Sf()[faceI]/mesh.magSf()[faceI]; \\floating point error } |
|
March 15, 2012, 05:22 |
|
#2 |
New Member
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
I've solved this problem, simply taking
mag(mesh.Sf()[faceI]); However, I really can't understand why there isn't a mesh.magSf() method for boundary faces when there is a mesh.Sf() method defined on them... |
|
March 15, 2012, 05:30 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi
You should be able to access the data in any of the following manners: Code:
const scalarField magnitude0 = Foam::mag( mesh.Sf().boundaryField()[patchi] ); const scalarField & magnitude1 = mesh.magSf().boundaryField()[patchi]; Best regards, Niels |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting Flow/Pressure Boundaries in Floworks | Eran | FloEFD, FloWorks & FloTHERM | 3 | August 11, 2009 05:23 |
periodic boundaries - flow through a net | PK | FLUENT | 0 | July 12, 2007 12:58 |
Periodic Boundaries in GAMBIT!! | swetha | FLUENT | 1 | November 26, 2006 23:02 |
mass flux correction at outflow boundaries | Subhra Datta | Main CFD Forum | 2 | November 24, 2003 14:11 |