|
[Sponsors] |
[mesh manipulation] extrudeMesh: Wedge extrusion with positive AND negative angle |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 27, 2013, 10:14 |
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 |
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, 16:31 |
|
#2 |
Senior Member
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17 |
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; How can I start again from the original patch (the one which is extruded at first) ? Any ideas ? Thanks |
|
October 20, 2013, 05:22 |
|
#3 |
Senior Member
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17 |
Up ...
Thanks |
|
October 20, 2013, 05:37 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Francois,
I honestly suggest that you take the simpler road on this case:
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
__________________
|
|
|
|
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 09:03 |
Inlet and outlet profile are partially positive and negative at the same time | Loekatoni | OpenFOAM Pre-Processing | 0 | January 18, 2019 06:11 |
separate positive and negative forces on surface | xava | Main CFD Forum | 3 | December 5, 2017 12:32 |
Why air’s torque is negative and water’s torque is positive? | Jackzm | CFX | 3 | December 16, 2015 17:27 |
Positive Pressure ang negative Pressure | moca | CFX | 3 | September 18, 2010 07:00 |