|
[Sponsors] |
BC development: how can I access to the patch normal? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2013, 05:59 |
BC development: how can I access to the patch normal?
|
#1 |
New Member
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 13 |
Dear Foamer,
I'm currently developing a boundary condition to force a given pressure gradient. For a gradient boundary condition, OpenFOAM needs the normal gradient, for example, a fixed pressure gradient looks like this (in the p file): Code:
outlet { type fixedValue; value uniform 1; //value uniform (1 0 0); <== this is wrong! } Code:
Field<scalar>& gradient = this->gradient(); gradient = myGradP*patchNormal //how to get "patchNormal"? The problem, I don't now how to access to the patch normal. Any Idea? Cheers, Marcel |
|
September 11, 2013, 06:09 |
|
#2 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi, this is what you need:
Code:
vectorField nVecCell = patch().nf(); Pablo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 04:04 |
Cyclic Boundary Condition | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Running, Solving & CFD | 36 | July 2, 2012 12:23 |
chtMultiRegionFoam Tutorial | m.nichols19 | OpenFOAM | 12 | September 9, 2010 11:56 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 04:38 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |