Commit Graph

16 Commits

Author SHA1 Message Date
Henry Weller
009203188f blockMesh: New experimental support for projecting block face point to geometric surfaces
For example, to mesh a sphere with a single block the geometry is defined in the
blockMeshDict as a searchableSurface:

    geometry
    {
        sphere
        {
            type searchableSphere;
            centre (0 0 0);
            radius 1;
        }
    }

The vertices, block topology and curved edges are defined in the usual
way, for example

    v 0.5773502;
    mv -0.5773502;

    a 0.7071067;
    ma -0.7071067;

    vertices
    (
        ($mv $mv $mv)
        ( $v $mv $mv)
        ( $v  $v $mv)
        ($mv  $v $mv)
        ($mv $mv  $v)
        ( $v $mv  $v)
        ( $v  $v  $v)
        ($mv  $v  $v)
    );

    blocks
    (
        hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
    );

    edges
    (
        arc 0 1 (0 $ma $ma)
        arc 2 3 (0 $a $ma)
        arc 6 7 (0 $a $a)
        arc 4 5 (0 $ma $a)

        arc 0 3 ($ma 0 $ma)
        arc 1 2 ($a 0 $ma)
        arc 5 6 ($a 0 $a)
        arc 4 7 ($ma 0 $a)

        arc 0 4 ($ma $ma 0)
        arc 1 5 ($a $ma 0)
        arc 2 6 ($a $a 0)
        arc 3 7 ($ma $a 0)
    );

which will produce a mesh in which the block edges conform to the sphere
but the faces of the block lie somewhere between the original cube and
the spherical surface which is a consequence of the edge-based
transfinite interpolation.

Now the projection of the block faces to the geometry specified above
can also be specified:

    faces
    (
        project (0 4 7 3) sphere
        project (2 6 5 1) sphere
        project (1 5 4 0) sphere
        project (3 7 6 2) sphere
        project (0 3 2 1) sphere
        project (4 5 6 7) sphere
    );

which produces a mesh that actually conforms to the sphere.

See OpenFOAM-dev/tutorials/mesh/blockMesh/sphere

This functionality is experimental and will undergo further development
and generalization in the future to support more complex surfaces,
feature edge specification and extraction etc.  Please get involved if
you would like to see blockMesh become a more flexible block-structured
mesher.

Henry G. Weller, CFD Direct.
2016-10-13 15:05:24 +01:00
Henry Weller
50b549f368 blockMesh: rationalizing class and member names 2016-10-08 19:48:39 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
graham
012494fdb5 STYLE: Fixing code style requirements for all apps.
Exception: applyWallFunctionBoundaryConditions.C cannot split #include
directives.
2010-07-27 15:27:05 +01:00
Mark Olesen
4ea1f8f98a ENH: enable vtkPolyhedron support when detected 2010-04-30 12:36:49 +02:00
Mark Olesen
6adf0cbca8 Merge remote branch 'OpenCFD/master' into olesenm 2010-03-30 11:42:19 +02:00
mattijs
9d216d5280 STYLE: Remove unused debug code 2010-03-30 08:20:22 +01:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
37c4f2f375 remove empty 'Description' from various .C files 2009-12-04 14:11:33 +01:00
Mark Olesen
6bdb7fb7b5 fixup copyright dates on new code 2009-11-30 08:21:44 +01:00
Mark Olesen
81891675ea Commit Paraview enhancements - quit working on sets/zones frills
- Include Sets/Zones now scans immediately to refresh the list of available
  mesh parts. Unfortunately, this also causes the object panel to be
  modified, even although the selection doesn't acutally need to change.
  This seems to be due to how the pqNamedWidgets are getting the information
  from the proxy properties. I can't figure if it's possible to acheive what
  I want, but we can probably live with the current implementation.

  After IncludeZones, simply us 'Reset' to undo the spurious GUI changes.
  Works fine - just looks a bit silly.

- Added 'Refresh' button to rescan for new times/fields.  Good for
  post-processing ongoing calculations without exiting the reader.

- Added 'Skip Zero Time' checkbox: many (some) calculations have
  data missing at time=0 (eg, rho, lagrangian, etc). This provides
  a convenient way to skip over this time.

- Future?:
  We could probably pick up favourite default values for these switches from
  ~OpenFOAM/controlDict, from a case system/paraview, or simply by making
  the casename.OpenFOAM also be an OpenFOAM dictionary with the settings.
2009-11-24 00:09:07 +01:00
Mark Olesen
83cee1cb68 First useful Qt modifications to the PV3blockMeshReader, PV3FoamReader
- Show Point Numbers as is_internal="1" and hook directly into a QT-checkbox
  and thus bypass modifying the reader state.

- Same for Cache Mesh and Show Patch Names
2009-10-23 00:33:42 +02:00
Mark Olesen
1ef88a2aef blockMesh reader fix, start refactoring of PV3Readers
- apply scaleFactor (eg, mm->m) in PV3 reader - this looks better when
  overlaying with other objects

- stop segfault when paraview exits without deleting readers first
2009-10-18 17:50:41 +02:00
Mark Olesen
c57262c2a0 Cleanup/fixup paraview readers
- remove patch/point text labels upon deletion

- combined client/server plugin instead of separate .so files
  first experiment with adding panel decorations

- directory reorganization
2009-10-18 16:23:41 +02:00