mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -120,22 +120,25 @@ public:
|
||||
inline wordRe(const wordRe&);
|
||||
|
||||
//- Construct from keyType
|
||||
inline wordRe(const keyType&, const compOption=LITERAL);
|
||||
inline explicit wordRe(const keyType&);
|
||||
|
||||
//- Construct from keyType
|
||||
inline wordRe(const keyType&, const compOption);
|
||||
|
||||
//- Construct as copy of word
|
||||
inline explicit wordRe(const word&);
|
||||
|
||||
//- Construct as copy of character array
|
||||
// Optionally specify how it should be treated.
|
||||
inline wordRe(const char*, const compOption = LITERAL);
|
||||
inline explicit wordRe(const char*, const compOption = LITERAL);
|
||||
|
||||
//- Construct as copy of string.
|
||||
// Optionally specify how it should be treated.
|
||||
inline wordRe(const string&, const compOption = LITERAL);
|
||||
inline explicit wordRe(const string&, const compOption = LITERAL);
|
||||
|
||||
//- Construct as copy of std::string
|
||||
// Optionally specify how it should be treated.
|
||||
inline wordRe(const std::string&, const compOption = LITERAL);
|
||||
inline explicit wordRe(const std::string&, const compOption = LITERAL);
|
||||
|
||||
//- Construct from Istream
|
||||
// Words are treated as literals, strings with an auto-test
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,6 +65,18 @@ inline Foam::wordRe::wordRe(const word& str)
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::wordRe::wordRe(const keyType& str)
|
||||
:
|
||||
word(str, false),
|
||||
re_()
|
||||
{
|
||||
if (str.isPattern())
|
||||
{
|
||||
compile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline Foam::wordRe::wordRe(const keyType& str, const compOption opt)
|
||||
:
|
||||
word(str, false),
|
||||
|
||||
@ -678,34 +678,8 @@ void Foam::motionSmoother::correct()
|
||||
}
|
||||
|
||||
|
||||
void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
void Foam::motionSmoother::setDisplacementPatchFields()
|
||||
{
|
||||
// See comment in .H file about shared points.
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& meshPoints = pp.meshPoints();
|
||||
|
||||
forAll(meshPoints, i)
|
||||
{
|
||||
displacement_[meshPoints[i]] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const labelList& ppMeshPoints = pp_.meshPoints();
|
||||
|
||||
// Set internal point data from displacement on combined patch points.
|
||||
forAll(ppMeshPoints, patchPointI)
|
||||
{
|
||||
displacement_[ppMeshPoints[patchPointI]] = patchDisp[patchPointI];
|
||||
}
|
||||
|
||||
// Adapt the fixedValue bc's (i.e. copy internal point data to
|
||||
// boundaryField for all affected patches)
|
||||
forAll(adaptPatchIDs_, i)
|
||||
@ -765,6 +739,42 @@ void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
displacement_.boundaryField()[patchI] ==
|
||||
displacement_.boundaryField()[patchI].patchInternalField();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
{
|
||||
// See comment in .H file about shared points.
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& meshPoints = pp.meshPoints();
|
||||
|
||||
forAll(meshPoints, i)
|
||||
{
|
||||
displacement_[meshPoints[i]] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const labelList& ppMeshPoints = pp_.meshPoints();
|
||||
|
||||
// Set internal point data from displacement on combined patch points.
|
||||
forAll(ppMeshPoints, patchPointI)
|
||||
{
|
||||
displacement_[ppMeshPoints[patchPointI]] = patchDisp[patchPointI];
|
||||
}
|
||||
|
||||
|
||||
// Adapt the fixedValue bc's (i.e. copy internal point data to
|
||||
// boundaryField for all affected patches)
|
||||
setDisplacementPatchFields();
|
||||
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -385,6 +385,10 @@ public:
|
||||
//- Take over existing mesh position.
|
||||
void correct();
|
||||
|
||||
//- Set patch fields on displacement to be consistent with
|
||||
// internal values.
|
||||
void setDisplacementPatchFields();
|
||||
|
||||
//- Set displacement field from displacement on patch points.
|
||||
// Modify provided displacement to be consistent with actual
|
||||
// boundary conditions on displacement. Note: resets the
|
||||
|
||||
@ -25,7 +25,18 @@ Class
|
||||
Foam::mappedPatchFieldBase
|
||||
|
||||
Description
|
||||
Functionality for sampling fields using mappedPatchBase.
|
||||
Functionality for sampling fields using mappedPatchBase. Every call to
|
||||
mappedField() returns a sampled field, optionally scaled to maintain an
|
||||
area-weighted average.
|
||||
|
||||
Example usage:
|
||||
|
||||
{
|
||||
fieldName T; // default is same as fvPatchField
|
||||
setAverage false;
|
||||
average 1.0; // only if setAverage=true
|
||||
interpolationScheme cellPoint; // default is cell
|
||||
}
|
||||
|
||||
SourceFiles
|
||||
mappedPatchFieldBase.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,7 +29,7 @@ Group
|
||||
|
||||
Description
|
||||
This velocity inlet/outlet boundary condition is applied to pressure
|
||||
boundaries where the pressure is specified. A zero-gradient condtion is
|
||||
boundaries where the pressure is specified. A zero-gradient condition is
|
||||
applied for outflow (as defined by the flux); for inflow, the velocity is
|
||||
obtained from the patch-face normal component of the internal-cell value.
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -138,6 +138,7 @@ Foam::layerParameters::layerParameters
|
||||
readLabel(dict.lookup("nSmoothSurfaceNormals"))
|
||||
),
|
||||
nSmoothNormals_(readLabel(dict.lookup("nSmoothNormals"))),
|
||||
nSmoothDisplacement_(dict.lookupOrDefault("nSmoothDisplacement", 0)),
|
||||
nSmoothThickness_(readLabel(dict.lookup("nSmoothThickness"))),
|
||||
maxFaceThicknessRatio_
|
||||
(
|
||||
@ -278,7 +279,7 @@ Foam::layerParameters::layerParameters
|
||||
const keyType& key = iter().keyword();
|
||||
const labelHashSet patchIDs
|
||||
(
|
||||
boundaryMesh.patchSet(List<wordRe>(1, key))
|
||||
boundaryMesh.patchSet(List<wordRe>(1, wordRe(key)))
|
||||
);
|
||||
|
||||
if (patchIDs.size() == 0)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -119,6 +119,8 @@ private:
|
||||
|
||||
label nSmoothNormals_;
|
||||
|
||||
label nSmoothDisplacement_;
|
||||
|
||||
label nSmoothThickness_;
|
||||
|
||||
scalar maxFaceThicknessRatio_;
|
||||
@ -275,6 +277,12 @@ public:
|
||||
return layerTerminationCos_;
|
||||
}
|
||||
|
||||
//- Smooth internal displacement
|
||||
label nSmoothDisplacement() const
|
||||
{
|
||||
return nSmoothDisplacement_;
|
||||
}
|
||||
|
||||
//- Smooth layer thickness over surface patches
|
||||
label nSmoothThickness() const
|
||||
{
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "faceZoneSet.H"
|
||||
#include "searchableSurface.H"
|
||||
#include "syncTools.H"
|
||||
#include "Time.H"
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -69,7 +70,15 @@ Foam::searchableSurfaceToFaceZone::searchableSurfaceToFaceZone
|
||||
searchableSurface::New
|
||||
(
|
||||
word(dict.lookup("surface")),
|
||||
mesh.objectRegistry::db(),
|
||||
IOobject
|
||||
(
|
||||
dict.lookupOrDefault("name", mesh.objectRegistry::db().name()),
|
||||
mesh.time().constant(),
|
||||
"triSurface",
|
||||
mesh.objectRegistry::db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
dict
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user