56 const scalar rMag =
mag(r);
57 const scalar dAiMag(
mag(dAi));
58 const scalar dAjMag(
mag(dAj));
60 if (rMag > SMALL && dAiMag > SMALL && dAjMag > SMALL)
63 const vector ni(dAi/dAiMag);
64 const vector nj(dAj/dAjMag);
67 -(nr & ni)*(nr & nj)/
sqr(rMag)*dAjMag*dAiMag/mathematical::pi;
69 if (Fij > 0)
return Fij;
81 const UList<List<vector>>& compactFineSf,
82 const UList<List<point>>& compactFineCf,
83 const UList<List<point>>& compactPoints,
84 const UList<label>& compactPatchId
91 forAll(visibleFaceFaces, facei)
95 Pout<<
"facei:" << facei <<
"/" << visibleFaceFaces.
size()
99 const labelList& visibleFaces = visibleFaceFaces[facei];
103 const point& dCi = compactCf[facei];
104 const vector& Ai = compactSf[facei];
105 const scalar magAi =
mag(Ai);
107 if (magAi < SMALL)
continue;
109 forAll(visibleFaces, visibleFacei)
111 const label sloti = visibleFaces[visibleFacei];
112 const point& dCj = compactCf[sloti];
113 const vector& Aj = compactSf[sloti];
115 const scalar Fij2AI = calculateFij(dCi, dCj, Ai, Aj);
117 Fij[facei][visibleFacei] = Fij2AI/magAi;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
void resize(const label len)
Adjust allocated size of list.
void size(const label n)
Older name for setAddressableSize.
Computes view factors according to the double area integral (2AI) method.
viewFactor2AI(const fvMesh &mesh, const dictionary &dict)
Constructor.
static scalar calculateFij(const point &xi, const point &xj, const vector &dAi, const vector &dAj)
Calculate view factor using the double-area integral.
A base class for viewFactor models.
virtual void calculate()
Calculate the view factors.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
A namespace for various viewFactor model implementations.
Different types of constants.
List< scalarList > scalarListList
List of scalarList.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.