CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] extrudeMesh: Wedge extrusion with positive AND negative angle

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2013, 09:14
Default extrudeMesh: Wedge extrusion with positive AND negative angle
  #1
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
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, 15:31
Default
  #2
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
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, 50 views)
File Type: jpg extruded_mesh.jpg (18.2 KB, 74 views)
File Type: jpg extruded_mesh_YZ.jpg (18.2 KB, 59 views)
francois is offline   Reply With Quote

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

Old   October 20, 2013, 04:37
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positive or negative values of Lambda2 for vortex structure visualization? vidyadhar OpenFOAM Running, Solving & CFD 3 November 27, 2019 08:03
Inlet and outlet profile are partially positive and negative at the same time Loekatoni OpenFOAM Pre-Processing 0 January 18, 2019 05:11
separate positive and negative forces on surface xava Main CFD Forum 3 December 5, 2017 11:32
Why air’s torque is negative and water’s torque is positive? Jackzm CFX 3 December 16, 2015 16:27
Positive Pressure ang negative Pressure moca CFX 3 September 18, 2010 06:00


All times are GMT -4. The time now is 19:25.