fvMeshMovers::multiValveEngine: Added support for pointZones frozen with respect specific moving object
for example it is now possible to freeze the cylinder head points with respect
to the piston motion but still move with respect to the valve motion by
specifying the cylinderHead pointZone only in the piston specification, e.g.:
piston
{
patches (piston);
axis (0 0 1);
motion
{
type crankConnectingRodMotion;
conRodLength 0.147;
stroke 0.08423;
}
// Move the points in the piston bowl with the piston
movingZones (pistonBowl);
// Freeze the points in the cylinder head
frozenZones (cylinderHead);
// There is no need to update the motion weights
fractionalTravelInterval 1;
}
This commit is contained in:
@ -211,6 +211,64 @@ Foam::fvMeshMovers::multiValveEngine::movingObject::movingPointZones() const
|
||||
}
|
||||
|
||||
|
||||
Foam::labelHashSet
|
||||
Foam::fvMeshMovers::multiValveEngine::movingObject::staticPointZones() const
|
||||
{
|
||||
labelHashSet staticPointZones;
|
||||
|
||||
if (frozenPointZones_.size())
|
||||
{
|
||||
forAll(frozenPointZones_, i)
|
||||
{
|
||||
const labelList indices
|
||||
(
|
||||
meshMover_.mesh().pointZones().findIndices(frozenPointZones_[i])
|
||||
);
|
||||
|
||||
if (indices.size())
|
||||
{
|
||||
staticPointZones.insert(indices);
|
||||
Info<< " pointZone " << frozenPointZones_[i]
|
||||
<< " is frozen (stationary)" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " frozenZone " << frozenPointZones_[i]
|
||||
<< " not found in pointZones" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (meshMover_.frozenPointZones_.size())
|
||||
{
|
||||
forAll(meshMover_.frozenPointZones_, i)
|
||||
{
|
||||
const labelList indices
|
||||
(
|
||||
meshMover_.mesh().pointZones().findIndices
|
||||
(
|
||||
meshMover_.frozenPointZones_[i]
|
||||
)
|
||||
);
|
||||
|
||||
if (indices.size())
|
||||
{
|
||||
staticPointZones.insert(indices);
|
||||
Info<< " pointZone " << meshMover_.frozenPointZones_[i]
|
||||
<< " is frozen (stationary)" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " frozenZone " << meshMover_.frozenPointZones_[i]
|
||||
<< " not found in pointZones" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return staticPointZones;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fvMeshMovers::multiValveEngine::movingObject::movingObject
|
||||
@ -241,6 +299,10 @@ Foam::fvMeshMovers::multiValveEngine::movingObject::movingObject
|
||||
(
|
||||
dict.lookupOrDefault("movingZones", wordReList::null())
|
||||
),
|
||||
frozenPointZones_
|
||||
(
|
||||
dict.lookupOrDefault("frozenZones", wordReList::null())
|
||||
),
|
||||
scale_
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -95,38 +95,6 @@ Foam::labelHashSet Foam::fvMeshMovers::multiValveEngine::findStaticPatchSet()
|
||||
}
|
||||
|
||||
|
||||
Foam::labelHashSet
|
||||
Foam::fvMeshMovers::multiValveEngine::staticPointZones() const
|
||||
{
|
||||
labelHashSet staticPointZones;
|
||||
|
||||
if (frozenPointZones_.size())
|
||||
{
|
||||
forAll(frozenPointZones_, i)
|
||||
{
|
||||
const labelList indices
|
||||
(
|
||||
mesh().pointZones().findIndices(frozenPointZones_[i])
|
||||
);
|
||||
|
||||
if (indices.size())
|
||||
{
|
||||
staticPointZones.insert(indices);
|
||||
Info<< " pointZone " << frozenPointZones_[i]
|
||||
<< " is frozen (stationary)" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " frozenZone " << frozenPointZones_[i]
|
||||
<< " not found in pointZones" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return staticPointZones;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fvMeshMovers::multiValveEngine::multiValveEngine(fvMesh& mesh)
|
||||
|
||||
@ -45,7 +45,7 @@ Description
|
||||
slide mesh nodes while piston is moving.
|
||||
|
||||
- frozenZones: list of pointZones the points of which are frozen,
|
||||
i.e. do not move.
|
||||
i.e. do not move with respect to any moving object.
|
||||
|
||||
- Run-time clearance estimation based on patch-to-patch distances printed.
|
||||
|
||||
@ -67,6 +67,9 @@ Description
|
||||
- movingZones: list of pointZones the points of which move with the
|
||||
object.
|
||||
|
||||
- frozenZones: list of pointZones the points of which are frozen,
|
||||
i.e. do not move with respect to this moving object.
|
||||
|
||||
- maxMotionDistance: a distance away from the moving object
|
||||
after nodes are not allowed to move. (Default inf.)
|
||||
|
||||
@ -152,6 +155,9 @@ Description
|
||||
// Move the points in the piston bowl with the piston
|
||||
movingZones (pistonBowl);
|
||||
|
||||
// Freeze the points in the cylinder head
|
||||
frozenZones (cylinderHead);
|
||||
|
||||
// Optional
|
||||
maxMotionDistance 1e30;
|
||||
movingFrozenLayerThickness 0;
|
||||
@ -295,6 +301,8 @@ public:
|
||||
|
||||
wordReList movingPointZones_;
|
||||
|
||||
wordReList frozenPointZones_;
|
||||
|
||||
//- Points to move when cell zone is supplied
|
||||
labelList pointIDs_;
|
||||
|
||||
@ -344,6 +352,8 @@ public:
|
||||
|
||||
labelHashSet movingPointZones() const;
|
||||
|
||||
labelHashSet staticPointZones() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -551,8 +561,6 @@ private:
|
||||
//- Find and return the static patch set
|
||||
labelHashSet findStaticPatchSet();
|
||||
|
||||
labelHashSet staticPointZones() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ void Foam::fvMeshMovers::multiValveEngine::pistonObject::updatePoints
|
||||
(
|
||||
pMesh,
|
||||
staticPatchSet_,
|
||||
meshMover_.staticPointZones(),
|
||||
staticPointZones(),
|
||||
points,
|
||||
maxMotionDistance_
|
||||
);
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::fvMeshMovers::multiValveEngine::valveObject::updatePoints
|
||||
(
|
||||
pMesh,
|
||||
staticPatchSet_,
|
||||
meshMover_.staticPointZones(),
|
||||
staticPointZones(),
|
||||
points,
|
||||
maxMotionDistance_
|
||||
);
|
||||
|
||||
@ -24,9 +24,6 @@ mover
|
||||
slidingPatches (liner);
|
||||
linerPatches (liner);
|
||||
|
||||
// Freeze the points in the cylinder head
|
||||
frozenZones (cylinderHead);
|
||||
|
||||
piston
|
||||
{
|
||||
patches (piston);
|
||||
@ -43,6 +40,9 @@ mover
|
||||
// Move the points in the piston bowl with the piston
|
||||
movingZones (pistonBowl);
|
||||
|
||||
// Freeze the points in the cylinder head
|
||||
frozenZones (cylinderHead);
|
||||
|
||||
// There is no need to update the motion weights
|
||||
fractionalTravelInterval 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user