Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
openfoam
openfoam
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 352
    • Issues 352
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • openfoamopenfoam
  • Issues
  • #1983

Closed
Open
Opened Jan 16, 2021 by Guanyang Xue@xuegy

v2012 new polyline extrudeMesh doesn't support spline

Functionality to add/problem to solve

In src/mesh/extrudeModel/polyline/polyline.H spline is mentioned as supported.

Description
Extrudes by transforming points along a polyline provided as a
series of points and edge segments. Supports all blockMesh edge
types, e.g. line, arc, spline. The surface points are rotated to
follow the path.

However when I added a spline to the path it shows

--> FOAM FATAL ERROR: (openfoam-2012)
Not implemented

    From Foam::scalar Foam::CatmullRomSpline::length() const
    in file blockEdges/splineEdge/CatmullRomSpline.C at line 136.

FOAM aborting

So basically in src/mesh/blockMesh/blockEdges/splineEdge/CatmullRomSpline.C

Foam::scalar Foam::CatmullRomSpline::length() const
{
    NotImplemented;
    return 1;
}

The length of the spline is not implemented yet and makes it impossible to extrude.

Target audience

When using lines and arcs, the discontinuity in curvature(2nd order derivative) results in sudden change on cell size.

See attached image: red<green<blue, the sudden change exceeds the ideal expansion ratio. mesh

Splines are naturally C2 continuous (not true for Catmull, see http://www.mvps.org/directx/articles/catmull/) and should guarantee a smooth transition of cell size.

Proposal

I don't know how to evaluate the length of Catmull Rom spline and can't find it online. But if the parametric equation is known then it's doable.

Seems like only lines and arcs are implemented and all other curves are left out. Is it possible to implement cubic spline as the length is well known?

What does success look like, and how can we measure that?

Implement the length of the spline and extrudeMesh should not show error message.

Links / references

N/A

Funding

N/A

Edited Jan 16, 2021 by Guanyang Xue
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: Development/openfoam#1983