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);
69 if (Fij > 0)
return Fij;
81 const List<List<vector>>& compactFineSf,
82 const List<List<point>>& compactFineCf,
83 const DynamicList<List<point>>& compactPoints,
84 const DynamicList<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;
131 const dictionary&
dict Different types of constants.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void resize(const label len)
Adjust allocated size of list.
viewFactor2AI(const fvMesh &mesh, const dictionary &dict)
Constructor.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< labelList > labelListList
List of labelList.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
virtual void calculate()
Calculate the view factors.
List< scalarList > scalarListList
List of scalarList.
constexpr scalar pi(M_PI)
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
vector point
Point is a vector.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static scalar calculateFij(const point &xi, const point &xj, const vector &dAi, const vector &dAj)
Calculate view factor using the double-area integral.
List< label > labelList
A List of labels.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)