# extrudeMesh: Wedge extrusion with positive AND negative angle

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

 September 27, 2013, 09:14 extrudeMesh: Wedge extrusion with positive AND negative angle #1 Senior Member   Francois Beaubert Join Date: Mar 2009 Location: Lille, France Posts: 144 Rep Power: 10 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

October 9, 2013, 15:31
#2
Senior Member

Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 144
Rep Power: 10
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
 original_off_surface.jpg (10.9 KB, 28 views) extruded_mesh.jpg (18.2 KB, 44 views) extruded_mesh_YZ.jpg (18.2 KB, 31 views)

 October 20, 2013, 04:22 #3 Senior Member   Francois Beaubert Join Date: Mar 2009 Location: Lille, France Posts: 144 Rep Power: 10 Up ... Thanks

 October 20, 2013, 04:37 #4 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,123 Blog Entries: 39 Rep Power: 110 Greetings Francois, I honestly suggest that you take the simpler road on this case: Use extrudeMesh with twice the angle to one direction. 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. __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide What am I doing/planning: blog/wiki Read this before sending me PM

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post moca CFX 3 September 18, 2010 06:00 bobo FLUENT 0 July 2, 2009 06:41 Wei-Haur Lam CFX 0 March 19, 2008 08:45 Emmanuel FLUENT 0 June 25, 2007 19:47 Andrew Garrard FLUENT 4 March 16, 2005 11:35

All times are GMT -4. The time now is 10:58.