34 template<
class Sol
idThermophysicalTransportModel>
39 if (!zoneCoordinateSystems_.size())
return;
47 zonesPatchFaces_.
setSize(zoneCoordinateSystems_.size());
52 PtrDictionary<coordinateSystem>,
53 zoneCoordinateSystems_,
57 zonesPatchFaces_[zonei].setSize(
patches.size());
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;
209 template<
class Sol
idThermophysicalTransportModel>
218 template<
class Sol
idThermophysicalTransportModel>
240 coordinateSystem_.R(
mesh.
C()).transformDiagTensor(materialKappa);
254 zoneCoordinateSystems_,
265 const label celli = zoneCells[i];
286 const label patchFacei =
287 zonesPatchFaces_[zonei][
patchi][zonePatchFacei];
289 KappaPf[patchFacei] =
293 materialKappaPf[patchFacei]
305 template<
class Sol
idThermophysicalTransportModel>
318 tmp<symmTensorField> tKappa
320 coordinateSystem_.R(CPf).transformDiagTensor(materialKappaPf)
328 PtrDictionary<coordinateSystem>,
329 zoneCoordinateSystems_,
333 const coordinateSystem& cs = iter();
337 const label patchFacei =
338 zonesPatchFaces_[zonei][
patchi][zonePatchFacei];
340 KappaPf[patchFacei] =
341 cs.R().transformDiagTensor
344 materialKappaPf[patchFacei]
355 template<
class Sol
idThermophysicalTransportModel>
365 template<
class Sol
idThermophysicalTransportModel>
378 template<
class Sol
idThermophysicalTransportModel>
394 template<
class Sol
idThermophysicalTransportModel>
404 template<
class Sol
idThermophysicalTransportModel>
422 *((nKappa -
n*(nKappa &
n)) & gradT().boundaryField()[
patchi])
432 template<
class Sol
idThermophysicalTransportModel>
458 template<
class Sol
idThermophysicalTransportModel>
462 SolidThermophysicalTransportModel::predict();
466 if (!zonesPatchFaces_.size())
468 setZonesPatchFaces();
473 template<
class Sol
idThermophysicalTransportModel>
481 template<
class Sol
idThermophysicalTransportModel>
489 zonesPatchFaces_.clear();
493 template<
class Sol
idThermophysicalTransportModel>
501 zonesPatchFaces_.clear();
505 template<
class Sol
idThermophysicalTransportModel>
513 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.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, 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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
virtual const labelList & faceOwner() const
Return face owner.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
List< bool > boolList
Bool container classes.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
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 sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
faceListList boundary(nPatches)
fluidMulticomponentThermo & thermo