CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

extrudeMesh: Wedge extrusion with positive AND negative angle

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   September 27, 2013, 10:14
Default extrudeMesh: Wedge extrusion with positive AND negative angle
  #1
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 127
Rep Power: 7
francois is on a distinguished road
Hi Foamers,

I would like to know if it's possible to use the wedge extrusion of the extrudeMesh utility with at the same time positive and negative angle value.

For example a symmetric wedge extrusion between -\theta,\theta would just be fine .

Is there some hidden option to control this in the extrudeMeshDict ?

Of course it's possible to split this in two operations but I've already got quite a lot of sub-domains that I have to stitch with stitchMesh utility and would like to avoid to use stitchMesh too much.

Does anyone know if it's possible to do this kind of wedge extrusion ?
Thank's for your helpful contributions

Happy Foaming
Francois
francois is offline   Reply With Quote

Old   October 9, 2013, 16:31
Default
  #2
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 127
Rep Power: 7
francois is on a distinguished road
Hi all,

I've modified the wedge.C source file to be able to use the wedge extrusion of the extrudeMesh utility with an angle between -Angle/2 and Angle/2 where Angle is the angle value read in the extrudeMeshDict file.

Of course it doesn't work .

My problem is that after the extrusion of the original patch in one direction (-Angle/2 <= \theta <= 0) I'm unable to start the extrusion in the other direction (0 <= \theta <= Angle/2) from the same original patch: it always starts from the last extruded layer.

Some pictures below will illustrate the problem clearer.

Here are the modified parts of the wedge.C source file :

Code:
else
    {
        //sliceAngle = angle_*layer/nLayers_;
        sliceAngle = -angle_*sumThickness(layer);
    }

    // Find projection onto axis (or rather decompose surfacePoint
    // into vector along edge (proj), vector normal to edge in plane
    // of surface point and surface normal.
    point d = surfacePoint - axisPt_;

    d -= (axis_ & d)*axis_;

    scalar dMag = mag(d);

    point edgePt = surfacePoint - d;

    // Rotate point around sliceAngle.
    point rotatedPoint = edgePt;
    point rotatedPoint2 = edgePt;

    if (dMag > VSMALL)
    {
        vector n = (d/dMag) ^ axis_;

        if (sliceAngle > -angle_/2.0)
        {
        rotatedPoint +=
          + cos(sliceAngle)*d
          - sin(sliceAngle)*mag(d)*n; // Use either n or surfaceNormal
        }
        else
        {
        sliceAngle = -angle_/2.0 + angle_*sumThickness(layer);
        rotatedPoint = rotatedPoint2 +
          + cos(sliceAngle)*d
          - sin(sliceAngle)*mag(d)*n; // Use either n or surfaceNormal
        }
    }

    return rotatedPoint;
The use of the rotatedPoint2 does nothing here because edgePt comes obviously from the last extruded layer.

How can I start again from the original patch (the one which is extruded at first) ?

Any ideas ?

Thanks
Attached Images
File Type: jpg original_off_surface.jpg (10.9 KB, 19 views)
File Type: jpg extruded_mesh.jpg (18.2 KB, 26 views)
File Type: jpg extruded_mesh_YZ.jpg (18.2 KB, 22 views)
francois is offline   Reply With Quote

Old   October 20, 2013, 05:22
Default
  #3
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 127
Rep Power: 7
francois is on a distinguished road
Up ...
Thanks
francois is offline   Reply With Quote

Old   October 20, 2013, 05:37
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Francois,

I honestly suggest that you take the simpler road on this case:
  1. Use extrudeMesh with twice the angle to one direction.
  2. Then use transfomPoints to rotate back once the desired angle.

This works, unless you want to perform this sort of manipulation for some other reason than using the resulting mesh as a wedge.

Best regards,
Bruno
Tobi likes this.
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positive Pressure ang negative Pressure moca CFX 3 September 18, 2010 07:00
body has to move in positive and negative x-direction (UDF?) bobo FLUENT 0 July 2, 2009 07:41
positive and negative torque forces Wei-Haur Lam CFX 0 March 19, 2008 09:45
Thrust value, positive or negative? Emmanuel FLUENT 0 June 25, 2007 20:47
positive feedback and negative species Andrew Garrard FLUENT 4 March 16, 2005 11:35


All times are GMT -4. The time now is 21:38.