CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Triangulation condition for timeVaryingMappedFixedValue (https://www.cfd-online.com/Forums/openfoam-solving/67825-triangulation-condition-timevaryingmappedfixedvalue.html)

 sega August 27, 2009 09:57

Triangulation condition for timeVaryingMappedFixedValue

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;             }         }     }```
Now my questions are:
• the condition for a "pass through" seems to be
magE1 > SMALL and magN > SMALL ?
Now I haven't found any definition of what SMALL may be?
What is it? Where is it defined?
• What kind of operation is e1 /= magE1 ?
• What is the break command doing?
• What is n = e1^e2 doing? This is not a power-operation, right?!

 All times are GMT -4. The time now is 23:20.