66 const List<List<vector>>& compactFineSf,
67 const List<List<point>>& compactFineCf,
68 const DynamicList<List<point>>& compactPoints,
69 const DynamicList<label>& compactPatchId
76 forAll(visibleFaceFaces, facei)
80 Pout<<
"facei:" << facei <<
"/" << visibleFaceFaces.size()
84 const labelList& visibleFaces = visibleFaceFaces[facei];
88 const point& dCi = compactCf[facei];
89 const vector& Ai = compactSf[facei];
90 const scalar magAi =
mag(Ai);
92 const vector d1((Ai/magAi) ^ emptyDir_);
93 const vector l1(0.5*magAi/w_*d1);
95 const point p1(dCi - l1);
97 forAll(visibleFaces, visibleFacei)
99 const label sloti = visibleFaces[visibleFacei];
101 const point& dCj = compactCf[sloti];
102 const vector& Aj = compactSf[sloti];
103 const scalar magAj =
mag(Aj);
105 const vector d2((Aj/magAj) ^ emptyDir_);
106 const vector l2(0.5*magAj/w_*d2);
107 const point p2(dCj - l2);
108 const point p3(dCj + l2);
110 const scalar FijH = calculateFij(
p0, p1, p2, p3);
112 Fij[facei][visibleFacei] = FijH/(magAi/w_);
126 const dictionary&
dict 133 if (
mesh.nSolutionD() != 2)
136 <<
"Hottel crossed strings method only applicable to 2D cases" 141 emptyDir_ = vector::one - emptyDir_;
142 emptyDir_.normalise();
146 w_ =
mesh.bounds().span() & emptyDir_;
148 Info<<
"\nEmpty direction: " << emptyDir_
149 <<
"\nWidth: " << w_ <<
endl;
Different types of constants.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
List< labelList > labelListList
List of labelList.
#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.
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
vector point
Point is a vector.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static scalar calculateFij(const point &p0, const point &p1, const point &p2, const point &p3)
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.
const volScalarField & p0
viewFactorHottel(const fvMesh &mesh, const dictionary &dict)
Constructor.