extrudeToRegionMesh: Rationalisation
An extruded region is now contiguous even when specified with multiple face zones. Edges that border faces in different zones now extrude into internal faces, rather than a pair of boundary faces. Different zones now result only in different mapped patches in the extruded and primary meshes. This means a mesh can be created for a single contiguous extruded region spanning multiple patches. This might be necessary if, for example, a film region is needed across multiple walls with differing thermal boundary conditions. Disconnected extruded regions can still be constructed by running the extrudeToRegionMesh utility muiliple times. The mapped patches created to couple the extruded regions now have symmetric names similar to those created by splitMeshRegions. For example, if the mapped patch in the primary region is called "region0_to_extrudedRegion_f0", then the corresponding patch in the extruded region is called "extrudedRegion_to_region0_f0" (f0, in this example is the face zone from which the region was extruded). Offsetting of the top patch is now handled automatically by a new mappedExtrudedWallPolyPatch. This refers to the bottom patch and automatically calculates the sampling offsets by doing a wave across the extruded mesh layers. This prevents the need to store the offsets in the patch itself, and makes it possible for the patch to undergo mesh changes without adding additional functions to the polyPatch (mapping constructors, autoMap and rmap methods, etc ...).
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -13,66 +13,36 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Name of region to create
|
||||
// Name of the region to create
|
||||
region liquidFilm;
|
||||
|
||||
// Specification of faces to extrude. Either faceZones (either exclusively
|
||||
// internal faces or boundary faces) or faceSets (boundary faces only).
|
||||
// internal faces or boundary faces) or faceSets (boundary faces only). These
|
||||
// faces will be connected to the bottom patch of the extruded region. If
|
||||
// shadow faces are also specified then these will be connected to the top
|
||||
// patch of the extruded region.
|
||||
|
||||
// FaceZones to extrude
|
||||
// The faceZones to extrude
|
||||
faceZones (f0 f1);
|
||||
//faceZonesShadow (f0Shadow f1Shadow);
|
||||
// faceZonesShadow (f0Shadow f1Shadow);
|
||||
|
||||
// faceSets to extrude
|
||||
//faceSets (f0 f1);
|
||||
//faceSetsShadow (f0Shadow f1Shadow);
|
||||
// The faceSets to extrude
|
||||
// faceSets (f0 f1);
|
||||
// faceSetsShadow (f0Shadow f1Shadow);
|
||||
|
||||
// Adapt the original mesh to have mapped patches at where the
|
||||
// faceZones are?
|
||||
// If true:
|
||||
// - extruding internal faces: become baffles on mapped patches
|
||||
// - extruding boundary faces: repatched to be on mapped patches
|
||||
// If false: leave original mesh intact. Extruded mesh will still have
|
||||
// mapped patch which might need to be adapted.
|
||||
// Adapt the original mesh to have mapped patches that connect to the extruded
|
||||
// region? If so, then extruded internal faces become baffles with mapped
|
||||
// patches, and extruded boundary faces are repatched onto mapped patches.
|
||||
// Otherwise the original mesh is not modified. The extruded mesh will still
|
||||
// have mapped patches created which will need to be changed.
|
||||
adaptMesh true;
|
||||
|
||||
// Sample mode for inter-region communication
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
|
||||
// 1 D extrusion
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
// Extrude 1D-columns of cells? This by default duplicates points so can
|
||||
// have overlapping columns (i.e. non space filling)
|
||||
oneD false;
|
||||
|
||||
//- If oneD: specify which boundary is wanted between the layers
|
||||
// oneDPolyPatchType empty; // wedge
|
||||
|
||||
//- If oneD: specify whether to duplicate points (i.e. disconnect 1D
|
||||
// columns) or only on non-manifold extrusion areas. Default is false.
|
||||
// nonManifold true;
|
||||
|
||||
|
||||
//- Extrusion model to use. The only logical choice is linearNormal?
|
||||
|
||||
//- Linear extrusion in normal direction
|
||||
//- Extrusion settings
|
||||
extrudeModel linearNormal;
|
||||
|
||||
//- Linear extrusion in specified direction
|
||||
// extrudeModel linearDirection;
|
||||
|
||||
//- Wedge extrusion. If nLayers is 1 assumes symmetry around plane.
|
||||
// extrudeModel wedge;
|
||||
|
||||
//- Extrudes into sphere around (0 0 0)
|
||||
// extrudeModel linearRadial;
|
||||
|
||||
//- Extrudes into sphere around (0 0 0) with specified radii
|
||||
//extrudeModel radial;
|
||||
|
||||
//- Extrudes into sphere with grading according to pressure (atmospherics)
|
||||
// extrudeModel radial;
|
||||
// extrudeModel sigmaRadial;
|
||||
|
||||
nLayers 10;
|
||||
@ -84,6 +54,12 @@ linearNormalCoeffs
|
||||
thickness 0.05;
|
||||
}
|
||||
|
||||
linearDirectionCoeffs
|
||||
{
|
||||
direction (0 1 0);
|
||||
thickness 0.05;
|
||||
}
|
||||
|
||||
wedgeCoeffs
|
||||
{
|
||||
axisPt (0 0.1 -0.05);
|
||||
@ -91,12 +67,6 @@ wedgeCoeffs
|
||||
angle 360; // For nLayers=1 assume symmetry so angle/2 on each side
|
||||
}
|
||||
|
||||
linearDirectionCoeffs
|
||||
{
|
||||
direction (0 1 0);
|
||||
thickness 0.05;
|
||||
}
|
||||
|
||||
linearRadialCoeffs
|
||||
{
|
||||
R 0.1;
|
||||
|
||||
@ -39,6 +39,7 @@ derivedFvPatches = $(fvPatches)/derived
|
||||
$(derivedFvPatches)/wall/wallFvPatch.C
|
||||
$(derivedFvPatches)/mapped/mappedFvPatch.C
|
||||
$(derivedFvPatches)/mapped/mappedWallFvPatch.C
|
||||
$(derivedFvPatches)/mapped/mappedExtrudedWallFvPatch.C
|
||||
|
||||
|
||||
meshWave = algorithms/FvFaceCellWave
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mappedExtrudedWallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(mappedExtrudedWallFvPatch, 0);
|
||||
addToRunTimeSelectionTable(fvPatch, mappedExtrudedWallFvPatch, polyPatch);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,80 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::mappedExtrudedWallFvPatch
|
||||
|
||||
SourceFiles
|
||||
mappedExtrudedWallFvPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef mappedExtrudedWallFvPatch_H
|
||||
#define mappedExtrudedWallFvPatch_H
|
||||
|
||||
#include "wallFvPatch.H"
|
||||
#include "mappedExtrudedWallPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mappedExtrudedWallFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class mappedExtrudedWallFvPatch
|
||||
:
|
||||
public wallFvPatch
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(mappedExtrudedWallPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
mappedExtrudedWallFvPatch
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const fvBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallFvPatch(patch, bm)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -250,9 +250,11 @@ patchToPatch/rays/raysPatchToPatch.C
|
||||
mappedPatches/mappedPolyPatch/mappedPatchBase.C
|
||||
mappedPatches/mappedPolyPatch/mappedPolyPatch.C
|
||||
mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C
|
||||
mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C
|
||||
|
||||
mappedPatches/mappedPointPatch/mappedPointPatch.C
|
||||
mappedPatches/mappedPointPatch/mappedWallPointPatch.C
|
||||
mappedPatches/mappedPointPatch/mappedExtrudedWallPointPatch.C
|
||||
|
||||
meshStructure/meshStructure.C
|
||||
meshStructure/topoDistanceData.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,22 +22,21 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::DeltaInfoData
|
||||
Foam::LayerInfoData
|
||||
|
||||
Description
|
||||
Class to be used with FaceCellWave which calculates the delta (thickness)
|
||||
across a layered mesh
|
||||
Class to be used with FaceCellWave which enumerates layers of cells and
|
||||
transports data through those layers
|
||||
|
||||
SourceFiles
|
||||
DeltaInfoDataI.H
|
||||
LayerInfoDataI.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef DeltaInfoData_H
|
||||
#define DeltaInfoData_H
|
||||
#ifndef LayerInfoData_H
|
||||
#define LayerInfoData_H
|
||||
|
||||
#include "pointField.H"
|
||||
#include "face.H"
|
||||
#include "layerInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -51,29 +50,23 @@ class transformer;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
template<class Type>
|
||||
class DeltaInfoData;
|
||||
class LayerInfoData;
|
||||
template<class Type>
|
||||
Ostream& operator<<(Ostream&, const DeltaInfoData<Type>&);
|
||||
Ostream& operator<<(Ostream&, const LayerInfoData<Type>&);
|
||||
template<class Type>
|
||||
Istream& operator>>(Istream&, DeltaInfoData<Type>&);
|
||||
Istream& operator>>(Istream&, LayerInfoData<Type>&);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class DeltaInfoData Declaration
|
||||
Class LayerInfoData Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class DeltaInfoData
|
||||
class LayerInfoData
|
||||
:
|
||||
public layerInfo
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Direction of propagation (+1 or -1) relative to the face normal.
|
||||
// Only valid when on a face. Takes a value of 0 when in a cell.
|
||||
label direction_;
|
||||
|
||||
//- The previous face index. Only valid when in a cell. Takes a value
|
||||
// of -1 if on a face.
|
||||
label prevFace_;
|
||||
|
||||
//- Data
|
||||
Type data_;
|
||||
|
||||
@ -83,10 +76,15 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
inline DeltaInfoData();
|
||||
inline LayerInfoData();
|
||||
|
||||
//- Construct for a face given a direction and data
|
||||
inline DeltaInfoData(const label direction, const Type& data);
|
||||
//- Construct given the face layer index and direction
|
||||
inline LayerInfoData
|
||||
(
|
||||
const label faceLayer,
|
||||
const label direction,
|
||||
const Type& data
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -99,22 +97,6 @@ public:
|
||||
|
||||
// Needed by FaceCellWave
|
||||
|
||||
//- Check whether the DeltaInfoData has been changed at all or still
|
||||
// contains original (invalid) value.
|
||||
template<class TrackingData>
|
||||
inline bool valid(TrackingData& td) const;
|
||||
|
||||
//- Check for identical geometrical data. Used for checking
|
||||
// consistency across cyclics.
|
||||
template<class TrackingData>
|
||||
inline bool sameGeometry
|
||||
(
|
||||
const polyMesh&,
|
||||
const DeltaInfoData<Type>&,
|
||||
const scalar,
|
||||
TrackingData& td
|
||||
) const;
|
||||
|
||||
//- Transform across an interface
|
||||
template<class TrackingData>
|
||||
inline void transform
|
||||
@ -131,8 +113,8 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisCelli,
|
||||
const label neighbourFacei,
|
||||
const DeltaInfoData<Type>& neighbourInfo,
|
||||
const label nbrFacei,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -143,8 +125,8 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFacei,
|
||||
const label neighbourCelli,
|
||||
const DeltaInfoData<Type>& neighbourInfo,
|
||||
const label nbrCelli,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -155,7 +137,7 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFacei,
|
||||
const DeltaInfoData<Type>& neighbourInfo,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -164,15 +146,15 @@ public:
|
||||
template<class TrackingData>
|
||||
inline bool equal
|
||||
(
|
||||
const DeltaInfoData<Type>&,
|
||||
const LayerInfoData<Type>&,
|
||||
TrackingData& td
|
||||
) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
inline bool operator==(const DeltaInfoData<Type>&) const;
|
||||
inline bool operator!=(const DeltaInfoData<Type>&) const;
|
||||
inline bool operator==(const LayerInfoData<Type>&) const;
|
||||
inline bool operator!=(const LayerInfoData<Type>&) const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
@ -180,12 +162,12 @@ public:
|
||||
friend Ostream& operator<< <Type>
|
||||
(
|
||||
Ostream&,
|
||||
const DeltaInfoData<Type>&
|
||||
const LayerInfoData<Type>&
|
||||
);
|
||||
friend Istream& operator>> <Type>
|
||||
(
|
||||
Istream&,
|
||||
DeltaInfoData<Type>&
|
||||
LayerInfoData<Type>&
|
||||
);
|
||||
};
|
||||
|
||||
@ -195,7 +177,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "DeltaInfoDataI.H"
|
||||
#include "LayerInfoDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,29 +23,28 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "DeltaInfoData.H"
|
||||
#include "LayerInfoData.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline Foam::DeltaInfoData<Type>::DeltaInfoData()
|
||||
inline Foam::LayerInfoData<Type>::LayerInfoData()
|
||||
:
|
||||
direction_(0),
|
||||
prevFace_(-labelMax),
|
||||
layerInfo(),
|
||||
data_()
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::DeltaInfoData<Type>::DeltaInfoData
|
||||
inline Foam::LayerInfoData<Type>::LayerInfoData
|
||||
(
|
||||
const label faceLayer,
|
||||
const label direction,
|
||||
const Type& data
|
||||
)
|
||||
:
|
||||
direction_(direction),
|
||||
prevFace_(-labelMax),
|
||||
layerInfo(faceLayer, direction),
|
||||
data_(data)
|
||||
{}
|
||||
|
||||
@ -53,7 +52,7 @@ inline Foam::DeltaInfoData<Type>::DeltaInfoData
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline const Type& Foam::DeltaInfoData<Type>::data() const
|
||||
inline const Type& Foam::LayerInfoData<Type>::data() const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
@ -61,58 +60,33 @@ inline const Type& Foam::DeltaInfoData<Type>::data() const
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::valid(TrackingData& td) const
|
||||
{
|
||||
return direction_ != 0 || prevFace_ != -labelMax;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::sameGeometry
|
||||
(
|
||||
const polyMesh&,
|
||||
const DeltaInfoData<Type>& l,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline void Foam::DeltaInfoData<Type>::transform
|
||||
inline void Foam::LayerInfoData<Type>::transform
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchFacei,
|
||||
const transformer& transform,
|
||||
TrackingData& td
|
||||
)
|
||||
{}
|
||||
{
|
||||
data_ = transform.transform(data_);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::updateCell
|
||||
inline bool Foam::LayerInfoData<Type>::updateCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisCelli,
|
||||
const label neighbourFacei,
|
||||
const DeltaInfoData<Type>& neighbourDeltaInfo,
|
||||
const label nbrFacei,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const bool o = thisCelli == mesh.faceOwner()[neighbourFacei];
|
||||
|
||||
if (o == (neighbourDeltaInfo.direction_ < 0))
|
||||
if (layerInfo::updateCell(mesh, thisCelli, nbrFacei, nbrInfo, tol, td))
|
||||
{
|
||||
direction_ = 0;
|
||||
prevFace_ = neighbourFacei;
|
||||
data_ = neighbourDeltaInfo.data_;
|
||||
|
||||
data_ = nbrInfo.data_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -124,29 +98,19 @@ inline bool Foam::DeltaInfoData<Type>::updateCell
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::updateFace
|
||||
inline bool Foam::LayerInfoData<Type>::updateFace
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisFacei,
|
||||
const label neighbourCelli,
|
||||
const DeltaInfoData<Type>& neighbourDeltaInfo,
|
||||
const label nbrCelli,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const cell& c = mesh.cells()[neighbourCelli];
|
||||
const label prevFacei = neighbourDeltaInfo.prevFace_;
|
||||
const label nextFacei = c.opposingFaceLabel(prevFacei, mesh.faces());
|
||||
|
||||
if (nextFacei == thisFacei)
|
||||
if (layerInfo::updateFace(mesh, thisFacei, nbrCelli, nbrInfo, tol, td))
|
||||
{
|
||||
const label direction =
|
||||
mesh.faceOwner()[thisFacei] == neighbourCelli ? +1 : -1;
|
||||
|
||||
direction_ = direction;
|
||||
prevFace_ = -labelMax;
|
||||
data_ = neighbourDeltaInfo.data_;
|
||||
|
||||
data_ = nbrInfo.data_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -158,30 +122,32 @@ inline bool Foam::DeltaInfoData<Type>::updateFace
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::updateFace
|
||||
inline bool Foam::LayerInfoData<Type>::updateFace
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisFacei,
|
||||
const DeltaInfoData<Type>& neighbourDeltaInfo,
|
||||
const LayerInfoData<Type>& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const label direction = -neighbourDeltaInfo.direction_;
|
||||
|
||||
direction_ = direction;
|
||||
prevFace_ = -labelMax;
|
||||
data_ = neighbourDeltaInfo.data_;
|
||||
|
||||
if (layerInfo::updateFace(mesh, thisFacei, nbrInfo, tol, td))
|
||||
{
|
||||
data_ = nbrInfo.data_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::DeltaInfoData<Type>::equal
|
||||
inline bool Foam::LayerInfoData<Type>::equal
|
||||
(
|
||||
const DeltaInfoData<Type>& rhs,
|
||||
const LayerInfoData<Type>& rhs,
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
@ -192,19 +158,19 @@ inline bool Foam::DeltaInfoData<Type>::equal
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline bool Foam::DeltaInfoData<Type>::operator==
|
||||
inline bool Foam::LayerInfoData<Type>::operator==
|
||||
(
|
||||
const Foam::DeltaInfoData<Type>& rhs
|
||||
const Foam::LayerInfoData<Type>& rhs
|
||||
) const
|
||||
{
|
||||
return direction_ == rhs.direction_ && prevFace_ == rhs.prevFace_;
|
||||
return layerInfo::operator==(rhs) && data_ == rhs.data_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline bool Foam::DeltaInfoData<Type>::operator!=
|
||||
inline bool Foam::LayerInfoData<Type>::operator!=
|
||||
(
|
||||
const Foam::DeltaInfoData<Type>& rhs
|
||||
const Foam::LayerInfoData<Type>& rhs
|
||||
) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
@ -214,19 +180,16 @@ inline bool Foam::DeltaInfoData<Type>::operator!=
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const DeltaInfoData<Type>& l)
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const LayerInfoData<Type>& l)
|
||||
{
|
||||
return os
|
||||
<< l.direction_ << token::SPACE
|
||||
<< l.prevFace_ << token::SPACE
|
||||
<< l.data_;
|
||||
return os << static_cast<const layerInfo&>(l) << token::SPACE << l.data_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::Istream& Foam::operator>>(Istream& is, DeltaInfoData<Type>& l)
|
||||
Foam::Istream& Foam::operator>>(Istream& is, LayerInfoData<Type>& l)
|
||||
{
|
||||
return is >> l.direction_ >> l.prevFace_ >> l.data_;
|
||||
return is >> static_cast<layerInfo&>(l) >> l.data_;
|
||||
}
|
||||
|
||||
|
||||
@ -135,8 +135,8 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisCelli,
|
||||
const label neighbourFacei,
|
||||
const layerInfo& neighbourInfo,
|
||||
const label nbrFacei,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -147,8 +147,8 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFacei,
|
||||
const label neighbourCelli,
|
||||
const layerInfo& neighbourInfo,
|
||||
const label nbrCelli,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -159,7 +159,7 @@ public:
|
||||
(
|
||||
const polyMesh&,
|
||||
const label thisFacei,
|
||||
const layerInfo& neighbourInfo,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -100,7 +100,7 @@ inline bool Foam::layerInfo::sameGeometry
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
return layer_ == l.layer_;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -120,21 +120,21 @@ inline bool Foam::layerInfo::updateCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisCelli,
|
||||
const label neighbourFacei,
|
||||
const layerInfo& neighbourLayerInfo,
|
||||
const label nbrFacei,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const bool o = thisCelli == mesh.faceOwner()[neighbourFacei];
|
||||
const bool o = thisCelli == mesh.faceOwner()[nbrFacei];
|
||||
|
||||
if (o == (neighbourLayerInfo.direction_ < 0))
|
||||
if (o == (nbrInfo.direction_ < 0))
|
||||
{
|
||||
if (valid(td) && prevFace_ != neighbourFacei) collide();
|
||||
if (valid(td) && prevFace_ != nbrFacei) collide();
|
||||
|
||||
layer_ = valid(td) ? -labelMax : neighbourLayerInfo.layer_ + 1;
|
||||
layer_ = valid(td) ? -labelMax : nbrInfo.layer_ + 1;
|
||||
direction_ = 0;
|
||||
prevFace_ = neighbourFacei;
|
||||
prevFace_ = nbrFacei;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -150,24 +150,24 @@ inline bool Foam::layerInfo::updateFace
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisFacei,
|
||||
const label neighbourCelli,
|
||||
const layerInfo& neighbourLayerInfo,
|
||||
const label nbrCelli,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const cell& c = mesh.cells()[neighbourCelli];
|
||||
const label prevFacei = neighbourLayerInfo.prevFace_;
|
||||
const cell& c = mesh.cells()[nbrCelli];
|
||||
const label prevFacei = nbrInfo.prevFace_;
|
||||
const label nextFacei = c.opposingFaceLabel(prevFacei, mesh.faces());
|
||||
|
||||
if (nextFacei == thisFacei)
|
||||
{
|
||||
const label direction =
|
||||
mesh.faceOwner()[thisFacei] == neighbourCelli ? +1 : -1;
|
||||
mesh.faceOwner()[thisFacei] == nbrCelli ? +1 : -1;
|
||||
|
||||
if (valid(td) && direction != direction_) collide();
|
||||
|
||||
layer_ = valid(td) ? -labelMax : neighbourLayerInfo.layer_ + 1;
|
||||
layer_ = valid(td) ? -labelMax : nbrInfo.layer_ + 1;
|
||||
direction_ = direction;
|
||||
prevFace_ = -labelMax;
|
||||
|
||||
@ -185,16 +185,16 @@ inline bool Foam::layerInfo::updateFace
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label thisFacei,
|
||||
const layerInfo& neighbourLayerInfo,
|
||||
const layerInfo& nbrInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
const label direction = -neighbourLayerInfo.direction_;
|
||||
const label direction = -nbrInfo.direction_;
|
||||
|
||||
if (valid(td) && direction != direction_) collide();
|
||||
|
||||
layer_ = valid(td) ? -labelMax : neighbourLayerInfo.layer_;
|
||||
layer_ = valid(td) ? -labelMax : nbrInfo.layer_;
|
||||
direction_ = direction;
|
||||
prevFace_ = -labelMax;
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mappedExtrudedWallPointPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(mappedExtrudedWallPointPatch, 0);
|
||||
|
||||
// Add the patch constructor functions to the hash tables
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
facePointPatch,
|
||||
mappedExtrudedWallPointPatch,
|
||||
polyPatch
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,80 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::mappedExtrudedWallPointPatch
|
||||
|
||||
SourceFiles
|
||||
mappedExtrudedWallPointPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef mappedExtrudedWallPointPatch_H
|
||||
#define mappedExtrudedWallPointPatch_H
|
||||
|
||||
#include "wallPointPatch.H"
|
||||
#include "mappedExtrudedWallPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mappedExtrudedWallPointPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class mappedExtrudedWallPointPatch
|
||||
:
|
||||
public wallPointPatch
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(mappedExtrudedWallPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from polyPatch
|
||||
mappedExtrudedWallPointPatch
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const pointBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallPointPatch(patch, bm)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,277 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mappedExtrudedWallPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "LayerInfoData.H"
|
||||
#include "FaceCellWave.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(mappedExtrudedWallPolyPatch, 0);
|
||||
|
||||
addToRunTimeSelectionTable(polyPatch, mappedExtrudedWallPolyPatch, word);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
polyPatch,
|
||||
mappedExtrudedWallPolyPatch,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::initCalcGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
mappedWallPolyPatch::initCalcGeometry(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::calcGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
mappedWallPolyPatch::calcGeometry(pBufs);
|
||||
samplePointsPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::initMovePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
mappedWallPolyPatch::initMovePoints(pBufs, p);
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::movePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
mappedWallPolyPatch::movePoints(pBufs, p);
|
||||
samplePointsPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||
{
|
||||
mappedWallPolyPatch::initTopoChange(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::topoChange(PstreamBuffers& pBufs)
|
||||
{
|
||||
mappedWallPolyPatch::topoChange(pBufs);
|
||||
samplePointsPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(name, size, start, index, bm, patchType),
|
||||
bottomPatch_(word::null)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(name, dict, index, bm, patchType),
|
||||
bottomPatch_(dict.lookupOrDefault<word>("bottomPatch", word::null))
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(pp, bm),
|
||||
bottomPatch_(pp.bottomPatch_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(pp, bm, index, newSize, newStart),
|
||||
bottomPatch_(pp.bottomPatch_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
bottomPatch_(pp.bottomPatch_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::~mappedExtrudedWallPolyPatch()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::pointField>
|
||||
Foam::mappedExtrudedWallPolyPatch::samplePoints() const
|
||||
{
|
||||
if (!samplePointsPtr_.valid())
|
||||
{
|
||||
const bool isExtrudedRegion = bottomPatch_ != word::null;
|
||||
|
||||
if (isExtrudedRegion)
|
||||
{
|
||||
// If this is the extruded region we need to work out where the
|
||||
// corresponding sampling points are on the bottom patch. We do
|
||||
// this by waving the bottom patch points across the layers.
|
||||
|
||||
const polyMesh& mesh = boundaryMesh().mesh();
|
||||
const polyPatch& pp = *this;
|
||||
const polyPatch& bottomPp = boundaryMesh()[bottomPatch_];
|
||||
|
||||
// Get the sample points from the bottom patch
|
||||
const pointField bottomSamplePoints
|
||||
(
|
||||
refCast<const mappedPatchBase>(bottomPp).samplePoints()
|
||||
);
|
||||
|
||||
// Initialise faces on the bottom patch to wave from
|
||||
labelList initialFaces(bottomPp.size());
|
||||
List<LayerInfoData<point>> initialFaceInfo(bottomPp.size());
|
||||
forAll(bottomPp, bottomPpFacei)
|
||||
{
|
||||
initialFaces[bottomPpFacei] =
|
||||
bottomPp.start() + bottomPpFacei;
|
||||
initialFaceInfo[bottomPpFacei] =
|
||||
LayerInfoData<point>
|
||||
(
|
||||
0,
|
||||
-1,
|
||||
bottomSamplePoints[bottomPpFacei]
|
||||
);
|
||||
}
|
||||
|
||||
// Wave across the mesh layers
|
||||
List<LayerInfoData<point>> faceInfo(mesh.nFaces());
|
||||
List<LayerInfoData<point>> cellInfo(mesh.nCells());
|
||||
FaceCellWave<LayerInfoData<point>>
|
||||
(
|
||||
mesh,
|
||||
initialFaces,
|
||||
initialFaceInfo,
|
||||
faceInfo,
|
||||
cellInfo,
|
||||
mesh.globalData().nTotalCells() + 1
|
||||
);
|
||||
|
||||
// Unpack into this patch's sample points
|
||||
samplePointsPtr_.set(new pointField(pp.size()));
|
||||
forAll(pp, ppFacei)
|
||||
{
|
||||
const LayerInfoData<point>& info =
|
||||
faceInfo[pp.start() + ppFacei];
|
||||
|
||||
static nil td;
|
||||
|
||||
if (!info.valid(td))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Mesh \"" << mesh.name()
|
||||
<< "\" is not layered between the extruded wall patch "
|
||||
<< "\"" << pp.name() << "\" and the bottom patch \""
|
||||
<< bottomPp.name() << "\"" << exit(FatalError);
|
||||
}
|
||||
|
||||
samplePointsPtr_()[ppFacei] = info.data();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If this is not the extruded region then we trigger construction
|
||||
// of mapping on the extruded region and then reverse map the
|
||||
// extruded region's sampling locations so they are available here
|
||||
|
||||
const mappedExtrudedWallPolyPatch& samplePp =
|
||||
refCast<const mappedExtrudedWallPolyPatch>(samplePolyPatch());
|
||||
|
||||
samplePointsPtr_.set
|
||||
(
|
||||
samplePp.reverseDistribute
|
||||
(
|
||||
samplePp.mappedPatchBase::samplePoints()
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return samplePointsPtr_();
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedExtrudedWallPolyPatch::write(Ostream& os) const
|
||||
{
|
||||
mappedWallPolyPatch::write(os);
|
||||
writeEntryIfDifferent(os, "bottomPatch", word::null, bottomPatch_);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,226 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::mappedExtrudedWallPolyPatch
|
||||
|
||||
Description
|
||||
Mapped wall patch which offsets the sampling points to account for the
|
||||
extrusion thickness
|
||||
|
||||
SourceFiles
|
||||
mappedExtrudedWallPolyPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef mappedExtrudedWallPolyPatch_H
|
||||
#define mappedExtrudedWallPolyPatch_H
|
||||
|
||||
#include "mappedWallPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class polyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mappedExtrudedWallPolyPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class mappedExtrudedWallPolyPatch
|
||||
:
|
||||
public mappedWallPolyPatch
|
||||
{
|
||||
private:
|
||||
|
||||
// Private Member Data
|
||||
|
||||
//- The bottom patch on the other side of the extruded region. Empty if
|
||||
// this is not the extruded region.
|
||||
word bottomPatch_;
|
||||
|
||||
//- The sample points
|
||||
mutable autoPtr<vectorField> samplePointsPtr_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Initialise the calculation of the patch geometry
|
||||
virtual void initCalcGeometry(PstreamBuffers&);
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry(PstreamBuffers&);
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints(PstreamBuffers&, const pointField&);
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||
|
||||
//- Initialise the update of the patch topology
|
||||
virtual void initTopoChange(PstreamBuffers&);
|
||||
|
||||
//- Update of the patch topology
|
||||
virtual void topoChange(PstreamBuffers&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("mappedExtrudedWall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct as copy, resetting the boundary mesh
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch&,
|
||||
const polyBoundaryMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original patch and resetting the
|
||||
// face list and boundary mesh information
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedExtrudedWallPolyPatch(*this, bm)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedExtrudedWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
newSize,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedExtrudedWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~mappedExtrudedWallPolyPatch();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the sampling points
|
||||
virtual tmp<pointField> samplePoints() const;
|
||||
|
||||
//- Write the polyPatch data as a dictionary
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -296,7 +296,7 @@ public:
|
||||
const polyPatch& samplePolyPatch() const;
|
||||
|
||||
//- Get the sample points
|
||||
tmp<pointField> samplePoints() const;
|
||||
virtual tmp<pointField> samplePoints() const;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ License
|
||||
#include "wedgePolyPatch.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "FaceCellWave.H"
|
||||
#include "DeltaInfoData.H"
|
||||
#include "LayerInfoData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -62,7 +62,7 @@ tmp<volScalarField::Internal> thermalBaffle::calcDelta() const
|
||||
|
||||
// Initialise faces on the first coupled patch with their centres as data
|
||||
initialFaces.clear();
|
||||
DynamicList<DeltaInfoData<point>> initialFaceInfoPoints;
|
||||
DynamicList<LayerInfoData<point>> initialFaceInfoPoints;
|
||||
{
|
||||
const polyPatch& pp =
|
||||
regionMesh().boundaryMesh()[intCoupledPatchIDs_[0]];
|
||||
@ -75,14 +75,14 @@ tmp<volScalarField::Internal> thermalBaffle::calcDelta() const
|
||||
const point& c = pp.faceCentres()[ppFacei];
|
||||
|
||||
initialFaces.append(pp.start() + ppFacei);
|
||||
initialFaceInfoPoints.append(DeltaInfoData<point>(-1, c));
|
||||
initialFaceInfoPoints.append(LayerInfoData<point>(0, -1, c));
|
||||
}
|
||||
}
|
||||
|
||||
// Wave across the mesh layers
|
||||
List<DeltaInfoData<point>> faceInfoPoints(regionMesh().nFaces());
|
||||
List<DeltaInfoData<point>> cellInfoPoints(regionMesh().nCells());
|
||||
FaceCellWave<DeltaInfoData<point>>
|
||||
List<LayerInfoData<point>> faceInfoPoints(regionMesh().nFaces());
|
||||
List<LayerInfoData<point>> cellInfoPoints(regionMesh().nCells());
|
||||
FaceCellWave<LayerInfoData<point>>
|
||||
(
|
||||
regionMesh(),
|
||||
initialFaces,
|
||||
@ -95,7 +95,7 @@ tmp<volScalarField::Internal> thermalBaffle::calcDelta() const
|
||||
// Calculate the distances between the opposite patch and load into data to
|
||||
// wave back in the opposite direction
|
||||
initialFaces.clear();
|
||||
DynamicList<DeltaInfoData<scalar>> initialFaceInfoDeltas;
|
||||
DynamicList<LayerInfoData<scalar>> initialFaceInfoDeltas;
|
||||
{
|
||||
const polyPatch& pp =
|
||||
regionMesh().boundaryMesh()[intCoupledPatchIDs_[1]];
|
||||
@ -112,15 +112,15 @@ tmp<volScalarField::Internal> thermalBaffle::calcDelta() const
|
||||
mag(c - faceInfoPoints[pp.start() + ppFacei].data());
|
||||
|
||||
initialFaces.append(pp.start() + ppFacei);
|
||||
initialFaceInfoDeltas.append(DeltaInfoData<scalar>(-1, d));
|
||||
initialFaceInfoDeltas.append(LayerInfoData<scalar>(0, -1, d));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Wave back across the layers
|
||||
List<DeltaInfoData<scalar>> faceInfoDeltas(regionMesh().nFaces());
|
||||
List<DeltaInfoData<scalar>> cellInfoDeltas(regionMesh().nCells());
|
||||
FaceCellWave<DeltaInfoData<scalar>>
|
||||
List<LayerInfoData<scalar>> faceInfoDeltas(regionMesh().nFaces());
|
||||
List<LayerInfoData<scalar>> cellInfoDeltas(regionMesh().nCells());
|
||||
FaceCellWave<LayerInfoData<scalar>>
|
||||
(
|
||||
regionMesh(),
|
||||
initialFaces,
|
||||
|
||||
@ -14,18 +14,27 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.0;
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -14,18 +14,27 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.77;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ FoamFile
|
||||
location "0";
|
||||
object O2;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
@ -21,11 +20,21 @@ internalField uniform 0.23;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
location "0";
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,15 +20,25 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,11 +20,20 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
@ -16,16 +16,25 @@ FoamFile
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 100000;
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
|
||||
@ -16,15 +16,24 @@ FoamFile
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 100000;
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
top
|
||||
{
|
||||
type prghTotalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,22 +20,14 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack|wallFilmFaces_top|cylinderFilmFaces_top)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,16 +20,13 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(wallFilmFaces_top|cylinderFilmFaces_top)"
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type noSlip;
|
||||
@ -39,6 +36,11 @@ boundaryField
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object delta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,22 +20,14 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(sides|frontAndBack|wallFilmFaces_top|cylinderFilmFaces_top)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/wallFilmRegion/polyMesh
|
||||
rm -rf constant/wallFilm/polyMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilmRegion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,10 +3,13 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allmesh
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
application=$(getApplication)
|
||||
runApplication $(getApplication)
|
||||
|
||||
runApplication $application
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilm
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
21
tutorials/modules/multicomponentFluid/cylinder/Allrun-parallel
Executable file
21
tutorials/modules/multicomponentFluid/cylinder/Allrun-parallel
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication decomposePar -noFields
|
||||
runParallel topoSet
|
||||
runParallel extrudeToRegionMesh -overwrite
|
||||
|
||||
runApplication -s fields decomposePar -fields -copyZero
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
runApplication reconstructPar
|
||||
runApplication -s wallFilm reconstructPar -region wallFilm
|
||||
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilm
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regionName wallFilmRegion;
|
||||
regionName wallFilm;
|
||||
|
||||
viscosity
|
||||
{
|
||||
|
||||
@ -99,7 +99,7 @@ defaultPatch
|
||||
|
||||
boundary
|
||||
(
|
||||
filmWalls
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
@ -108,8 +108,15 @@ boundary
|
||||
(1 2 21 20)
|
||||
(12 11 30 31)
|
||||
(13 12 31 32)
|
||||
(10 5 24 29)
|
||||
);
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(5 0 19 24)
|
||||
(10 5 24 29)
|
||||
(16 10 29 35)
|
||||
(11 16 35 30)
|
||||
);
|
||||
@ -121,14 +128,21 @@ boundary
|
||||
(
|
||||
(2 3 22 21)
|
||||
(3 6 25 22)
|
||||
(7 8 27 26)
|
||||
(6 7 26 25)
|
||||
(8 18 37 27)
|
||||
(18 17 36 37)
|
||||
(14 13 32 33)
|
||||
(17 14 33 36)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(6 7 26 25)
|
||||
(7 8 27 26)
|
||||
(8 18 37 27)
|
||||
(18 17 36 37)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -16,32 +16,7 @@ FoamFile
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method metis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
processorWeights ( 1 1 1 1 );
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
method scotch;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -13,13 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
region wallFilmRegion;
|
||||
region wallFilm;
|
||||
|
||||
faceZones (wallFilmFaces);
|
||||
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
oneD false;
|
||||
faceZones (wallFilmFaces cylinderFilmFaces);
|
||||
|
||||
extrudeModel linearNormal;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ actions
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch filmWalls;
|
||||
patch walls;
|
||||
}
|
||||
{
|
||||
name wallFilmFaces;
|
||||
@ -30,6 +30,20 @@ actions
|
||||
source setToFaceZone;
|
||||
faceSet wallFilmFaceSet;
|
||||
}
|
||||
{
|
||||
name cylinderFilmFaceSet;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch cylinder;
|
||||
}
|
||||
{
|
||||
name cylinderFilmFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setToFaceZone;
|
||||
faceSet cylinderFilmFaceSet;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,12 +20,14 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -20,12 +20,14 @@ internalField uniform 0.77;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -20,12 +20,14 @@ internalField uniform 0.23;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -20,19 +20,21 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type mapped;
|
||||
field T;
|
||||
average 300;
|
||||
setAverage no;
|
||||
value uniform 300;
|
||||
average 300;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,20 +20,21 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type mapped;
|
||||
uniformValue constant (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
field U;
|
||||
average (0 0 0);
|
||||
setAverage no;
|
||||
average (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 1e-7;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
@ -27,7 +29,7 @@ boundaryField
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type alphatFilmWallFunction;
|
||||
B 5.5;
|
||||
|
||||
@ -20,16 +20,18 @@ internalField uniform 1e-7;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 1e-7;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 1e-07;
|
||||
value uniform 1e-7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,13 +20,15 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type convectiveHeatTransfer;
|
||||
L 1;
|
||||
|
||||
@ -20,16 +20,18 @@ internalField uniform 1e-5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 1e-5;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 1e-05;
|
||||
value uniform 1e-5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,13 +20,15 @@ internalField uniform 1e-7;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type nutkFilmWallFunction;
|
||||
B 5.5;
|
||||
|
||||
@ -20,16 +20,18 @@ internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 100000;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,17 +20,18 @@ internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 100000;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(region0_to.*)"
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
gradient uniform 0;
|
||||
value uniform 100000;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,22 +20,20 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
// top film surface
|
||||
"(.*top)"
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
// mapped boundaries
|
||||
"(region0_to.*)"
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
// type zeroGradient;
|
||||
type fixedValue;
|
||||
value uniform 350.0;
|
||||
}
|
||||
|
||||
// floor sides
|
||||
walls
|
||||
".*_top"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,23 +20,22 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
// top film surface
|
||||
"(.*top)"
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
// mapped boundaries
|
||||
"(region0_to.*)"
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
// floor sides
|
||||
walls
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
".*_top"
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object delta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,23 +20,22 @@ internalField uniform 0.0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
// top film surface
|
||||
"(.*top)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
// mapped boundaries
|
||||
"(region0_to.*)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
// floor sides
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"wallFilm_to_region0_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
".*_top"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,8 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/wallFilmRegion/polyMesh
|
||||
cleanCase && rm -rf constant/wallFilm/polyMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Create the underlying block mesh
|
||||
runApplication blockMesh
|
||||
|
||||
# Create the set for the obstacles
|
||||
runApplication topoSet
|
||||
|
||||
# Create the obstacles - add obstacle patches to wallFilm patch
|
||||
runApplication subsetMesh c0 -patch wallFilm -overwrite -noFields
|
||||
|
||||
# Create a wallFilmRegion faceZone from the obstacles and floor
|
||||
runApplication -s wallFilmRegion topoSet -dict topoSetDict.wallFilmRegion
|
||||
|
||||
# Create the wall film region from the wallFilmRegion faceZone via extrusion
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilmRegion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -4,9 +4,30 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=$(getApplication)
|
||||
runApplication blockMesh
|
||||
|
||||
./Allmesh
|
||||
runApplication $application
|
||||
runApplication decomposePar -noFields
|
||||
|
||||
# Create a set for the bits of the mesh that are not boxes
|
||||
runParallel topoSet
|
||||
|
||||
# Create the boxes and add their surfaces to the boxes patch
|
||||
runParallel subsetMesh notBoxes -patch boxes -overwrite -noFields
|
||||
|
||||
# Create zones from the floor and the boxes
|
||||
runParallel -s wallFilm topoSet -dict topoSetDict.wallFilm
|
||||
|
||||
# Create the film mesh
|
||||
runParallel extrudeToRegionMesh -overwrite
|
||||
|
||||
runApplication -s fields decomposePar -fields -copyZero
|
||||
|
||||
runParallel $(getApplication);
|
||||
|
||||
runApplication reconstructPar
|
||||
runApplication -s wallFilm reconstructPar -region wallFilm
|
||||
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilm
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allmesh
|
||||
|
||||
cp -Rf 0.orig 0
|
||||
|
||||
application=$(getApplication)
|
||||
|
||||
runApplication -s primaryRegion decomposePar
|
||||
runApplication -s wallFilmRegion decomposePar -region wallFilmRegion
|
||||
|
||||
runParallel $application
|
||||
|
||||
runApplication -s primaryRegion reconstructPar
|
||||
runApplication -s wallFilmRegion reconstructPar -region wallFilmRegion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regionName wallFilmRegion;
|
||||
regionName wallFilm;
|
||||
|
||||
viscosity
|
||||
{
|
||||
|
||||
@ -46,7 +46,7 @@ boundary
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
wallFilm
|
||||
floor
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
@ -54,6 +54,12 @@ boundary
|
||||
(0 3 2 1)
|
||||
);
|
||||
}
|
||||
boxes
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -14,13 +14,15 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
numberOfSubdomains 12;
|
||||
|
||||
method scotch;
|
||||
method hierarchical;
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 3);
|
||||
order xyz;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -13,13 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
region wallFilmRegion;
|
||||
region wallFilm;
|
||||
|
||||
faceZones (wallFilmFaces);
|
||||
|
||||
oneD false;
|
||||
|
||||
sampleMode nearestPatchFace;
|
||||
faceZones (floorFilmFaces boxesFilmFaces);
|
||||
|
||||
extrudeModel linearNormal;
|
||||
|
||||
|
||||
@ -17,38 +17,38 @@ FoamFile
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action clear;
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source boxToCell;
|
||||
box (0.4 0.1 0.1) (0.6 0.3 0.3);
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source boxToCell;
|
||||
box (0.4 0.1 0.4) (0.6 0.3 0.6);
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source boxToCell;
|
||||
box (0.4 0.4 0.1) (0.6 0.6 0.3);
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
name notBoxes;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source boxToCell;
|
||||
|
||||
@ -17,18 +17,32 @@ FoamFile
|
||||
actions
|
||||
(
|
||||
{
|
||||
name wallFilmFaceSet;
|
||||
name floorFilmFaceSet;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch wallFilm;
|
||||
patch floor;
|
||||
}
|
||||
{
|
||||
name wallFilmFaces;
|
||||
name floorFilmFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setToFaceZone;
|
||||
faceSet wallFilmFaceSet;
|
||||
faceSet floorFilmFaceSet;
|
||||
}
|
||||
{
|
||||
name boxesFilmFaceSet;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch boxes;
|
||||
}
|
||||
{
|
||||
name boxesFilmFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setToFaceZone;
|
||||
faceSet boxesFilmFaceSet;
|
||||
}
|
||||
);
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -14,7 +14,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.0;
|
||||
@ -23,17 +22,24 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.77;
|
||||
@ -23,17 +22,24 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ FoamFile
|
||||
location "0";
|
||||
object O2;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
@ -23,17 +22,24 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
location "0";
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -22,23 +22,28 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,19 +23,21 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
type noSlip;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
@ -25,17 +25,20 @@ boundaryField
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
|
||||
@ -22,17 +22,22 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
type prghTotalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
type prghTotalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
|
||||
region0_to_wallFilm_wallFilmFaces
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,16 +20,6 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
@ -45,6 +35,16 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wallFilm_to_region0_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,16 +20,6 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
@ -45,6 +35,16 @@ boundaryField
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
wallFilm_to_region0_wallFilmFaces
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/wallFilmRegion";
|
||||
location "0/wallFilm";
|
||||
object delta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -20,16 +20,6 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
@ -45,6 +35,16 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wallFilmFaces_top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wallFilm_to_region0_wallFilmFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/wallFilmRegion/polyMesh
|
||||
rm -rf constant/wallFilm/polyMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet -dict wallFilmRegion.topoSet
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region wallFilmRegion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,10 +3,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allmesh
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
application=$(getApplication)
|
||||
paraFoam -touchAll
|
||||
|
||||
runApplication $application
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regionName wallFilmRegion;
|
||||
regionName wallFilm;
|
||||
|
||||
viscosity
|
||||
{
|
||||
|
||||
@ -13,14 +13,10 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
region wallFilmRegion;
|
||||
region wallFilm;
|
||||
|
||||
faceZones (wallFilmFaces);
|
||||
|
||||
oneD false;
|
||||
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
extrudeModel linearNormal;
|
||||
|
||||
nLayers 1;
|
||||
|
||||
@ -33,8 +33,8 @@ solvers
|
||||
|
||||
"(U|h)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 0;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ FoamFile
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -9,7 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/wallFilmRegion";
|
||||
location "system/wallFilm";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -18,16 +18,16 @@ solvers
|
||||
{
|
||||
"alpha.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-10;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|e).*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-10;
|
||||
relTol 0;
|
||||
}
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
location "0";
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -28,6 +28,7 @@ boundaryField
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type fixedValue;
|
||||
|
||||
@ -27,6 +27,7 @@ boundaryField
|
||||
type pressureInletOutletVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type noSlip;
|
||||
|
||||
@ -27,6 +27,7 @@ boundaryField
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
{
|
||||
type calculated;
|
||||
|
||||
@ -27,7 +27,7 @@ boundaryField
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
wallFilm_to_region0_walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ boundaryField
|
||||
type slip;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
wallFilm_to_region0_walls
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ boundaryField
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilm_walls
|
||||
wallFilm_to_region0_walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -17,10 +17,6 @@ region wallFilm;
|
||||
|
||||
faceZones (walls);
|
||||
|
||||
oneD false;
|
||||
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
extrudeModel linearNormal;
|
||||
|
||||
nLayers 1;
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
location "0";
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -32,7 +32,7 @@ boundaryField
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
|
||||
@ -31,7 +31,7 @@ boundaryField
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -29,7 +30,7 @@ boundaryField
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ boundaryField
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
region0_to_wallFilmRegion_wallFilmFaces
|
||||
"region0_to_wallFilm_.*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user