mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional feedback about controlled mesh motion update type
- ensure that the updateControl is "non-sticky" on re-read, even if we do not support runtime-modifiable here STYLE: add syntax example (wingMotion), but with updateInterval 1
This commit is contained in:
@ -41,9 +41,7 @@ namespace Foam
|
|||||||
|
|
||||||
void Foam::dynamicFvMesh::readDict()
|
void Foam::dynamicFvMesh::readDict()
|
||||||
{
|
{
|
||||||
IOdictionary dict
|
IOobject dictHeader
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"dynamicMeshDict",
|
"dynamicMeshDict",
|
||||||
thisDb().time().constant(),
|
thisDb().time().constant(),
|
||||||
@ -51,10 +49,25 @@ void Foam::dynamicFvMesh::readDict()
|
|||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false // Do not register
|
false // Do not register
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (dictHeader.typeHeaderOk<IOdictionary>(false, false))
|
||||||
|
{
|
||||||
|
IOdictionary dict(dictHeader);
|
||||||
timeControl_.read(dict);
|
timeControl_.read(dict);
|
||||||
|
|
||||||
|
if (!timeControl_.always())
|
||||||
|
{
|
||||||
|
// Feedback about the trigger mechanism
|
||||||
|
Info<< "Controlled mesh update triggered on "
|
||||||
|
<< timeControl_.type() << nl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Ensure it is pass-through
|
||||||
|
timeControl_.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -138,7 +151,8 @@ bool Foam::dynamicFvMesh::controlledUpdate()
|
|||||||
if (!timeControl_.always())
|
if (!timeControl_.always())
|
||||||
{
|
{
|
||||||
// Feedback that update has been triggered
|
// Feedback that update has been triggered
|
||||||
Info<< "Mesh update triggered based on " << timeControl_.name() << nl;
|
Info<< "Mesh update triggered based on "
|
||||||
|
<< timeControl_.type() << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->update();
|
return this->update();
|
||||||
|
|||||||
@ -20,6 +20,11 @@ motionSolverLibs (sixDoFRigidBodyMotion);
|
|||||||
|
|
||||||
motionSolver sixDoFRigidBodyMotion;
|
motionSolver sixDoFRigidBodyMotion;
|
||||||
|
|
||||||
|
// Not necessarily useful here, but can have different motion updates types
|
||||||
|
updateControl timeStep;
|
||||||
|
updateInterval 1;
|
||||||
|
|
||||||
|
|
||||||
patches (wing);
|
patches (wing);
|
||||||
innerDistance 0.3;
|
innerDistance 0.3;
|
||||||
outerDistance 1;
|
outerDistance 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user