66 const UList<List<vector>>& compactFineSf,
67 const UList<List<point>>& compactFineCf,
68 const UList<List<point>>& compactPoints,
69 const UList<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_);
133 if (
mesh.nSolutionD() != 2)
136 <<
"Hottel crossed strings method only applicable to 2D cases"
142 emptyDir_.normalise();
146 w_ =
mesh.bounds().span() & emptyDir_;
148 Info<<
"\nEmpty direction: " << emptyDir_
149 <<
"\nWidth: " << w_ <<
endl;
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void size(const label n)
Older name for setAddressableSize.
Computes view factors according to Hottel's crossed strings method.
static scalar calculateFij(const point &p0, const point &p1, const point &p2, const point &p3)
Calculate view factor using the double-area integral.
viewFactorHottel(const fvMesh &mesh, const dictionary &dict)
Constructor.
A base class for viewFactor models.
virtual void calculate()
Calculate the view factors.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & p0
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.
messageStream Info
Information stream (stdout output on master, null elsewhere).
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.
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.