mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -143,11 +143,19 @@ castellatedMeshControls
|
||||
}
|
||||
}
|
||||
|
||||
// Optional angle to detect small-large cell situation perpendicular
|
||||
// to the surface. Is the angle of face w.r.t the local surface
|
||||
// normal. Use on flat(ish) surfaces only. Otherwise
|
||||
// leave out or set to negative number.
|
||||
//- Optional angle to detect small-large cell situation
|
||||
// perpendicular to the surface. Is the angle of face w.r.t.
|
||||
// the local surface normal. Use on flat(ish) surfaces only.
|
||||
// Otherwise leave out or set to negative number.
|
||||
//perpendicularAngle 10;
|
||||
|
||||
|
||||
//- Optional faceZone and (for closed surface) cellZone with
|
||||
// how to select the cells that are in the cellZone
|
||||
// (inside / outside / specified insidePoint)
|
||||
//faceZone sphere;
|
||||
//cellZone sphere;
|
||||
//cellZoneInside inside; //outside/insidePoint
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -439,6 +439,7 @@ bool doCommand
|
||||
const word& actionName,
|
||||
const bool writeVTKFile,
|
||||
const bool writeCurrentTime,
|
||||
const bool noSync,
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
@ -581,7 +582,7 @@ bool doCommand
|
||||
// Set will have been modified.
|
||||
|
||||
// Synchronize for coupled patches.
|
||||
currentSet.sync(mesh);
|
||||
if (!noSync) currentSet.sync(mesh);
|
||||
|
||||
// Write
|
||||
if (writeVTKFile)
|
||||
@ -834,6 +835,11 @@ int main(int argc, char *argv[])
|
||||
"file",
|
||||
"process in batch mode, using input from specified file"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noSync",
|
||||
"do not synchronise selection across coupled patches"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -842,6 +848,7 @@ int main(int argc, char *argv[])
|
||||
const bool writeVTK = !args.optionFound("noVTK");
|
||||
const bool loop = args.optionFound("loop");
|
||||
const bool batch = args.optionFound("batch");
|
||||
const bool noSync = args.optionFound("noSync");
|
||||
|
||||
if (loop && !batch)
|
||||
{
|
||||
@ -1008,7 +1015,8 @@ int main(int argc, char *argv[])
|
||||
setName,
|
||||
actionName,
|
||||
writeVTK,
|
||||
loop, // if in looping mode dump sets to time directory
|
||||
loop, // if in looping mode dump sets to time directory
|
||||
noSync,
|
||||
is
|
||||
);
|
||||
|
||||
|
||||
@ -49,11 +49,18 @@ int main(int argc, char *argv[])
|
||||
"specify an alternative dictionary for the topoSet dictionary"
|
||||
);
|
||||
# include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noSync",
|
||||
"do not synchronise selection across coupled patches"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createNamedPolyMesh.H"
|
||||
|
||||
const bool noSync = args.optionFound("noSync");
|
||||
|
||||
const word dictName("topoSetDict");
|
||||
|
||||
fileName dictPath = dictName;
|
||||
@ -140,6 +147,23 @@ int main(int argc, char *argv[])
|
||||
case topoSetSource::NEW:
|
||||
case topoSetSource::ADD:
|
||||
case topoSetSource::DELETE:
|
||||
{
|
||||
Info<< " Applying source " << word(dict.lookup("source"))
|
||||
<< endl;
|
||||
autoPtr<topoSetSource> source = topoSetSource::New
|
||||
(
|
||||
dict.lookup("source"),
|
||||
mesh,
|
||||
dict.subDict("sourceInfo")
|
||||
);
|
||||
|
||||
source().applyToSet(action, currentSet());
|
||||
// Synchronize for coupled patches.
|
||||
if (!noSync) currentSet().sync(mesh);
|
||||
currentSet().write();
|
||||
}
|
||||
break;
|
||||
|
||||
case topoSetSource::SUBSET:
|
||||
{
|
||||
Info<< " Applying source " << word(dict.lookup("source"))
|
||||
@ -148,12 +172,28 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
dict.lookup("source"),
|
||||
mesh,
|
||||
dict.subDict("sourceDict")
|
||||
dict.subDict("sourceInfo")
|
||||
);
|
||||
|
||||
source().applyToSet(action, currentSet());
|
||||
// Backup current set.
|
||||
autoPtr<topoSet> oldSet
|
||||
(
|
||||
topoSet::New
|
||||
(
|
||||
setType,
|
||||
mesh,
|
||||
currentSet().name() + "_old2",
|
||||
currentSet()
|
||||
)
|
||||
);
|
||||
|
||||
currentSet().clear();
|
||||
source().applyToSet(topoSetSource::NEW, currentSet());
|
||||
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet().subset(oldSet());
|
||||
// Synchronize for coupled patches.
|
||||
currentSet().sync(mesh);
|
||||
if (!noSync) currentSet().sync(mesh);
|
||||
currentSet().write();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -301,31 +301,61 @@ FoamFile
|
||||
|
||||
actions
|
||||
(
|
||||
// Example:pick up internal faces on outside of cellSet
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Load initial cellSet
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source labelToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
value (12 13 56);
|
||||
}
|
||||
}
|
||||
|
||||
// Get all faces in cellSet
|
||||
{
|
||||
name c0;
|
||||
name f0;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Determine inverse cellSet
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
}
|
||||
}
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
// Keep in f0 all faces in c1
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source labelToCell;
|
||||
sourceDict
|
||||
name f0;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
value (1 2 3);
|
||||
set c1;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -591,18 +591,27 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (showTransform)
|
||||
{
|
||||
Info<< "Transform tensor from reference state (Q). " << nl
|
||||
Info<< "Transform tensor from reference state (orientation):" << nl
|
||||
<< eVec.T() << nl
|
||||
<< "Rotation tensor required to transform "
|
||||
"from the body reference frame to the global "
|
||||
"reference frame, i.e.:" << nl
|
||||
<< "globalVector = Q & bodyLocalVector"
|
||||
<< nl << eVec.T()
|
||||
<< "globalVector = orientation & bodyLocalVector"
|
||||
<< endl;
|
||||
|
||||
Info<< nl
|
||||
<< "Entries for sixDoFRigidBodyDisplacement boundary condition:"
|
||||
<< nl
|
||||
<< " mass " << m << token::END_STATEMENT << nl
|
||||
<< " centreOfMass " << cM << token::END_STATEMENT << nl
|
||||
<< " momentOfInertia " << eVal << token::END_STATEMENT << nl
|
||||
<< " orientation " << eVec.T() << token::END_STATEMENT
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (calcAroundRefPt)
|
||||
{
|
||||
Info << "Inertia tensor relative to " << refPt << ": "
|
||||
Info<< nl << "Inertia tensor relative to " << refPt << ": " << nl
|
||||
<< applyParallelAxisTheorem(m, cM, J, refPt)
|
||||
<< endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user