|
[Sponsors] | |||||
Triangulation condition for timeVaryingMappedFixedValue |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 21 ![]() |
Hello World.
I'm currently trying to understand the check for a correct local coordinate system with the use of timeVaryingMappedFixedValue boundary condition. For simplicity I will post the relevant part of the code. The complete code is here: http://foam.sourceforge.net/doc/Doxy...8C_source.html Code:
const point& p0 = samplePoints[0];
// Find point separate from p0
vector e1;
label index1 = -1;
for (label i = 1; i < samplePoints.size(); i++)
{
e1 = samplePoints[i] - p0;
scalar magE1 = mag(e1);
if (magE1 > SMALL)
{
e1 /= magE1;
index1 = i;
break;
}
}
// Find point that makes angle with n1
label index2 = -1;
vector e2;
vector n;
for (label i = index1+1; i < samplePoints.size(); i++)
{
e2 = samplePoints[i] - p0;
scalar magE2 = mag(e2);
if (magE2 > SMALL)
{
e2 /= magE2;
n = e1^e2;
scalar magN = mag(n);
if (magN > SMALL)
{
index2 = i;
n /= magN;
break;
}
}
}
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CFX Solver : Sudden crash | Hervé | CFX | 2 | June 16, 2008 07:40 |
| Airfoil boundary condition | Frank | Main CFD Forum | 1 | April 21, 2008 19:36 |
| Slip boundary condition what is inside | normunds | OpenFOAM Running, Solving & CFD | 2 | June 4, 2007 07:45 |
| Pressure Boundary Condition | Matt Umbel | Main CFD Forum | 0 | January 11, 2002 11:06 |
| The Boundary Condition about the Flat Plate | boing | Main CFD Forum | 1 | January 6, 2002 17:53 |