- in continuation of #2565 (rotationCentre for surface output formats) it is helpful to also support READ_IF_PRESENT behaviour for the 'origin' keyword. This can be safely used wherever the coordinate system definition is embedded within a sub-dictionary scope. Eg, dict1 { coordinateSystem { origin (0 0 0); // now optional here rotation ...; } } but remains mandatory if constructed without a sub-dict: dict2 { origin (0 0 0); // still mandatory e1 (1 0 0); e3 (0 0 1); } With this change, the "transform" sub-dictionary can written more naturally: formatOptions { vtk { scale 1000; // m -> mm transform { rotationCentre (1 0 0); rotation axisAngle; axis (0 0 1); angle -45; } } } ENH: simplify handling of "coordinateSystem" dictionary lookups - coordinateSystems::NewIfPresent method for optional entries: coordSysPtr_ = coordinateSystem::NewIfPresent(mesh, dict); Instead of if (dict.found(coordinateSystem::typeName, keyType::LITERAL)) { coordSysPtr_ = coordinateSystem::New ( mesh_, dict, coordinateSystem::typeName ); } else { coordSysPtr_.reset(); } ENH: more consistent handling of priorities for binModels, forces (#2598) - if the dictionaries are overspecified, give a 'coordinateSystem' entry a higher prioriy than the 'CofR' shortcuts. Was previously slightly inconsistent between the different models.
149 lines
3.0 KiB
C++
149 lines
3.0 KiB
C++
// -*- C++ -*-
|
|
|
|
// ************************************************************************* //
|
|
|
|
debug
|
|
{
|
|
type surfaces;
|
|
libs (sampling);
|
|
log true;
|
|
writeControl timeStep;
|
|
writeInterval 1;
|
|
|
|
fields (p rho U);
|
|
|
|
sampleScheme cellPoint;
|
|
interpolationScheme cellPoint;
|
|
surfaceFormat ensight;
|
|
// surfaceFormat vtk;
|
|
// surfaceFormat raw;
|
|
|
|
formatOptions
|
|
{
|
|
ensight
|
|
{
|
|
collateTimes true;
|
|
// collateTimes false;
|
|
fieldLevel
|
|
{
|
|
"p.*" 1e5;
|
|
U 0;
|
|
}
|
|
}
|
|
raw
|
|
{
|
|
normal true;
|
|
precision 8;
|
|
}
|
|
}
|
|
|
|
_plane
|
|
{
|
|
type plane;
|
|
source cells;
|
|
triangulate false;
|
|
|
|
normal (-1 0 0);
|
|
point (-0.042 0 0);
|
|
///point (-0.0425 0 0); // between faces
|
|
}
|
|
|
|
_disk1
|
|
{
|
|
surfaceType disk;
|
|
origin (-0.1 -0.05 0);
|
|
normal (1 1 1);
|
|
radius 0.015;
|
|
}
|
|
|
|
surfaces
|
|
{
|
|
angledPlane
|
|
{
|
|
type distanceSurface;
|
|
distance 0;
|
|
signed true;
|
|
regularise true;
|
|
surfaceType triSurfaceMesh;
|
|
surfaceName angledPlane.obj;
|
|
}
|
|
|
|
angledPlaneCut
|
|
{
|
|
type surfaceCut;
|
|
triangulate false;
|
|
surfaceType triSurfaceMesh;
|
|
surfaceName angledPlane.obj;
|
|
}
|
|
|
|
angledPlane1
|
|
{
|
|
type distanceSurface;
|
|
distance 0;
|
|
signed true;
|
|
regularise true;
|
|
surfaceType triSurfaceMesh;
|
|
surfaceName angledPlane1.obj;
|
|
}
|
|
|
|
angledPlane1Cut
|
|
{
|
|
type surfaceCut;
|
|
triangulate false;
|
|
surfaceType triSurfaceMesh;
|
|
surfaceName angledPlane1.obj;
|
|
}
|
|
|
|
disk1
|
|
{
|
|
${_disk1}
|
|
type distanceSurface;
|
|
distance 0;
|
|
cell false;
|
|
signed true;
|
|
triangulate false;
|
|
}
|
|
|
|
iso
|
|
{
|
|
type isoSurface;
|
|
isoField p;
|
|
isoValue 1e5;
|
|
regularise true;
|
|
interpolate true;
|
|
|
|
formatOptions
|
|
{
|
|
ensight
|
|
{
|
|
transform
|
|
{
|
|
// origin (0 0 0);
|
|
rotationCentre (0.025 0 0);
|
|
rotation axisAngle;
|
|
axis (0 1 0);
|
|
angle 90;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Top channel
|
|
plane1
|
|
{
|
|
${_plane}
|
|
bounds (-1 0 -1) (0 1 1);
|
|
}
|
|
|
|
// Bottom channel
|
|
plane2
|
|
{
|
|
${_plane}
|
|
bounds (-1 -1 -1) (0 0 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|