34 template<
class Sol
idThermophysicalTransportModel>
39 if (!zoneCoordinateSystems_.size())
return;
43 const fvMesh& mesh = this->
thermo().mesh();
44 const fvBoundaryMesh&
patches = mesh.boundary();
47 zonesPatchFaces_.
setSize(zoneCoordinateSystems_.size());
52 PtrDictionary<coordinateSystem>,
53 zoneCoordinateSystems_,
57 zonesPatchFaces_[zonei].setSize(
patches.size());
59 const labelList& zoneCells = mesh.cellZones()[iter().name()];
62 boolList cellInZone(mesh.nCells(),
false);
66 cellInZone[zoneCells[i]] =
true;
73 zonesPatchFaces_[zonei][
patchi].setSize(pp.size());
75 label nZonePatchFaces = 0;
79 const label facei = pp.start() + patchFacei;
81 if (cellInZone[own[facei]])
83 zonesPatchFaces_[zonei][
patchi][nZonePatchFaces++] =
88 zonesPatchFaces_[zonei][
patchi].setSize(nZonePatchFaces);
98 template<
class Sol
idThermophysicalTransportModel>
106 SolidThermophysicalTransportModel(typeName,
alpha,
thermo),
111 this->coeffDict().template lookupOrDefault<
Switch>
119 if (this->coeffDict().
found(
"zones"))
121 const dictionary& zonesDict(this->coeffDict().subDict(
"zones"));
123 Info<<
" Reading coordinate system for zones:" <<
endl;
129 const word& zoneName = iter().keyword();
134 zoneCoordinateSystems_.
insert
143 setZonesPatchFaces();
163 const scalar alignmentFactor =
167 *
mag(nKappa -
n*(nKappa &
n))
170 if (alignmentFactor > 1
e-3)
175 Info<<
" Kappa is not aligned with patch "
177 <<
" by an alignment factor of " << alignmentFactor
178 <<
" (0=aligned, 1=unaligned)" <<
nl
179 <<
" heat-flux correction will be applied." <<
endl;
184 if (!aligned && boundaryAligned_)
190 " boundaryAligned is set true, "
191 "boundary alignment of kappa will be enforced." <<
endl;
205 this->printCoeffs(typeName);
211 template<
class Sol
idThermophysicalTransportModel>
220 template<
class Sol
idThermophysicalTransportModel>
242 coordinateSystem_.R(mesh.
C()).transformDiagTensor(materialKappa);
256 zoneCoordinateSystems_,
267 const label celli = zoneCells[i];
288 const label patchFacei =
289 zonesPatchFaces_[zonei][
patchi][zonePatchFacei];
291 KappaPf[patchFacei] =
295 materialKappaPf[patchFacei]
307 template<
class Sol
idThermophysicalTransportModel>
320 tmp<symmTensorField> tKappa
322 coordinateSystem_.R(CPf).transformDiagTensor(materialKappaPf)
330 PtrDictionary<coordinateSystem>,
331 zoneCoordinateSystems_,
335 const coordinateSystem& cs = iter();
339 const label patchFacei =
340 zonesPatchFaces_[zonei][
patchi][zonePatchFacei];
342 KappaPf[patchFacei] =
343 cs.R().transformDiagTensor
346 materialKappaPf[patchFacei]
357 template<
class Sol
idThermophysicalTransportModel>
367 template<
class Sol
idThermophysicalTransportModel>
380 template<
class Sol
idThermophysicalTransportModel>
396 template<
class Sol
idThermophysicalTransportModel>
414 *((nKappa -
n*(nKappa &
n)) & gradT().boundaryField()[
patchi])
424 template<
class Sol
idThermophysicalTransportModel>
450 template<
class Sol
idThermophysicalTransportModel>
454 SolidThermophysicalTransportModel::predict();
458 if (!zonesPatchFaces_.size())
460 setZonesPatchFaces();
465 template<
class Sol
idThermophysicalTransportModel>
473 template<
class Sol
idThermophysicalTransportModel>
481 zonesPatchFaces_.clear();
485 template<
class Sol
idThermophysicalTransportModel>
493 zonesPatchFaces_.clear();
497 template<
class Sol
idThermophysicalTransportModel>
505 zonesPatchFaces_.clear();
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
void insert(const word &, T *)
Add at head of dictionary.
const dimensionSet & dimensions() const
Return dimensions.
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
void setSize(const label)
Reset size of List.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
virtual symmTensor transformDiagTensor(const vector &p, const vector &v) const =0
Transform diagTensor masquerading as a vector using transformation.
Base class for other coordinate system specifications.
static autoPtr< coordinateSystem > New(const objectRegistry &obr, const dictionary &dict)
Select constructed from dictionary and objectRegistry.
const coordinateRotation & R() const
Return const reference to co-ordinate rotation.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const fvSchemes & schemes() const
Return the fvSchemes.
const fvSolution & solution() const
Return the fvSolution.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
void setFluxRequired(const word &name) const
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
const cellZoneList & cellZones() const
Return cell zones.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Base-class for solid thermodynamic properties.
Solid thermophysical transport model for anisotropic thermal conductivity.
virtual bool movePoints()
Update for mesh motion.
SolidThermophysicalTransportModel::alphaField alphaField
virtual tmp< scalarField > qCorr(const label patchi) const
Return the patch heat flux correction [W/m^2].
virtual void predict()
Correct the anisotropic viscosity.
virtual void mapMesh(const polyMeshMap &map)
Update from another mesh using the given map.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
virtual tmp< volScalarField > kappa() const
Thermal conductivity [W/m/K].
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
anisotropic(const alphaField &alpha, const solidThermo &thermo)
Construct from solid thermophysical properties.
virtual void topoChange(const polyTopoChangeMap &map)
Update topology using the given map.
virtual bool read()
Read thermophysicalTransport dictionary.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
void enableCache(const word &name) const
Enable caching of the given field.
A class for managing temporary objects.
A class for handling words, derived from string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Calculate the laplacian of the given field.
Calculate the snGrad of the given volField.
Calculate the matrix for the laplacian of the field.
const polyBoundaryMesh & bMesh
const fvPatchList & patches
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > laplacianCorrection(const VolField< scalar > &gamma, const VolField< Type > &vf)
Type gSum(const FieldField< Field, Type > &f)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< bool > boolList
Bool container classes.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
faceListList boundary(nPatches)
fluidMulticomponentThermo & thermo