20 const word outputName,
21 const word outputType,
27 UPtrList<DAFunction>& daFunctionList)
49 FatalErrorIn(
" ") <<
"wallDistanceMethod: "
51 <<
" Options are: default and daCustom."
59 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
76 const objectRegistry& db =
mesh_.thisDb();
77 const volScalarField&
T = db.lookupObject<volScalarField>(
"T");
85 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
88 label faceCellI =
mesh_.boundaryMesh()[patchI].faceCells()[faceI];
89 output[counterI] =
T[faceCellI];
95 scalar deltaCoeffs = 0;
105 if (turbModelType ==
"incompressible")
109 IOdictionary transportProperties(
111 "transportProperties",
112 mesh_.time().constant(),
117 scalar Cp = readScalar(transportProperties.lookup(
"Cp"));
123 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
129 deltaCoeffs =
T.boundaryField()[patchI].patch().deltaCoeffs()[faceI];
133 label nearWallCellIndex =
mesh_.boundaryMesh()[patchI].faceCells()[faceI];
134 vector c1 =
mesh_.Cf().boundaryField()[patchI][faceI];
135 vector c2 =
mesh_.C()[nearWallCellIndex];
136 scalar d = mag(c1 - c2);
139 scalar alphaEffBf =
alphaEff.boundaryField()[patchI][faceI];
141 output[counterI] = Cp * alphaEffBf * deltaCoeffs;
147 if (turbModelType ==
"compressible")
154 const fluidThermo&
thermo =
mesh_.thisDb().lookupObject<fluidThermo>(
"thermophysicalProperties");
155 const volScalarField&
he =
thermo.he();
157 const IOdictionary& thermoDict =
mesh_.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
158 dictionary mixSubDict = thermoDict.subDict(
"mixture");
159 dictionary specieSubDict = mixSubDict.subDict(
"specie");
160 scalar molWeight = specieSubDict.getScalar(
"molWeight");
161 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
162 scalar Cp = thermodynamicsSubDict.getScalar(
"Cp");
166 scalar RR = Foam::constant::thermodynamic::RR;
170 scalar R = RR / molWeight;
174 if (
he.name() ==
"e")
188 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
194 deltaCoeffs =
T.boundaryField()[patchI].patch().deltaCoeffs()[faceI];
198 label nearWallCellIndex =
mesh_.boundaryMesh()[patchI].faceCells()[faceI];
199 vector c1 =
mesh_.Cf().boundaryField()[patchI][faceI];
200 vector c2 =
mesh_.C()[nearWallCellIndex];
201 scalar d = mag(c1 - c2);
204 scalar alphaEffBf =
alphaEff.boundaryField()[patchI][faceI];
206 output[counterI] = tmpVal * alphaEffBf * deltaCoeffs;
215 IOdictionary solidProperties(
218 mesh_.time().constant(),
223 scalar
k = readScalar(solidProperties.lookup(
"k"));
229 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
235 deltaCoeffs =
T.boundaryField()[patchI].patch().deltaCoeffs()[faceI];
239 label nearWallCellIndex =
mesh_.boundaryMesh()[patchI].faceCells()[faceI];
240 vector c1 =
mesh_.Cf().boundaryField()[patchI][faceI];
241 vector c2 =
mesh_.C()[nearWallCellIndex];
242 scalar d = mag(c1 - c2);
246 output[counterI] =
k * deltaCoeffs;
253 FatalErrorIn(
"DAOutputThermalCoupling::run") <<
" discipline not valid! "
254 << abort(FatalError);