CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Mesh Utilities (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/)
-   -   upper and lower patch for a 0_thick Membrane in a wind tunnel (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/109220-upper-lower-patch-0_thick-membrane-wind-tunnel.html)

hfs November 12, 2012 17:06

upper and lower patch for a 0_thick Membrane in a wind tunnel
 
3 Attachment(s)
Hello All!

I have a membrane that I need to simulate wind pressure on..

I have it in an STL file (a zero thickness surface)

I am trying to get 2 patches for the membrane: one for the upper side and one for the lower side.

I did the following:
1-blockMesh with extra patches Umb1 and Umb2
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices       
(
(-100 -100 0)//0
(-100 100 0)//1
(-100 100 75)//2
(-100 -100 75)//3
(200 -100 0)//4
(200 100 0)//5
(200 100 75)//6
(200 -100 75)//7
);

blocks         
(
hex (0 1 2 3 4 5 6 7) (50 20 75) simpleGrading (1 1 1)
);

edges         
(
);

boundary       
(
    inlet
    {
      type patch;
      faces
      (
      (0 3 2 1)
      );
    }
    outlet
    {
      type  patch;
      faces
      (
      (4 7 6 5)
      );
    }
    bottomWall
    {
      type  wall;
      faces
      (
      (0 1 5 4)   
      );
    }
      topWall
    {
      type  wall;
      faces
      (
      (3 2 6 7)
      );
    }
    frontAndBack
    {
      type    symmetryPlane;
      faces
      (
      (0 4 7 3)   
      (1 5 6 2)
      );
    }   
      Umb1
    {
      type    patch;
      faces
      (     
      );
    }
      Umb2
    {
      type    patch;
      faces
      (     
      );
    }

);

mergePatchPairs
(
);

// ************************************************************************* //

2- SnappyHexMesh with faceZone Umb line to create a faceZone out of the STL "Umb.stl"

3- createBaffles Umb '(Umb1 Umb2)'

I got 2 patches .. but they are not the upper and the lower side of the Umbrella ... I knew that when I tried to simulate and got crazy results for the pressure (See attachments)

The Pressure should be consistant on each side; i.e. either positive or negative in a continuos manner ... the pic shows that each patch Umb1 and Umb2 is a random combination of the upper and the lower side of the Umbrella :(

I will gratefully appreciate any suggestion!

Thanks!

hfs November 13, 2012 10:53

Does that have something to do with the orientation of the faces?
If yes, how can I control the orientation of my faces ... and then how can I make 2 patched depending on the orientation so that I insure that Umb1 is Upper and Umb2 is Lower?

hfs November 13, 2012 11:29

Here I have uploaded my Meshing Case and Simulation Case

http://dl.dropbox.com/u/32336583/How...Patches.tar.gz

Please take a look

Thanks!

wyldckat November 18, 2012 19:10

Greetings hfs,

:eek: I learned a new trick today using your case! We can use STL surfaces for creating internal "faceZones" only, without the need for creating "cellZones"! I didn't know that worked!
This means that we can try and model mesh with snappyHexMesh, at least in an attempt to force certain faces to be along a ghostly geometry :D

So I did some testing and:
  1. From the case you provided, I tested the mesh package only.
  2. The resulting mesh did indeed have vectors pointing in the wrong direction. Problem is that those faces we're pointing almost parallel to the surface. You can check this by:
    1. When opening the case, pick only one of the baffles, such as Umb1.
    2. Apply the filter "Generate Surface Normals".
    3. Apply to the last one the "Glyph" filter;
    4. And you should then be able to see the vectors pointing in the wrong direction!
  3. I then moved to do some trial-and-errors, all including increasing the level mesh resolution from 2 to 3 in "snappyHexMeshDict".
  4. Here is one of the most successful tests so far: http://dl.dropbox.com/u/7429808/Meshing_Case_v1.tar.gz
    It uses the "faceZones" for a first run, but for generating a mesh that adjusted itself to an extruded version with caps, based on your umbrella surface.
    Then on a second pass, after removing the Zones related files, adjust the mesh to the desired surface. It at least fixed the problem with the badly oriented normals, but it did not fix the issue with edges not being fully snapped :(
  5. I've done some more tests, but none worked with proper success:
    • Tried doing it all in a single go, while using the extruded version lowered 5 meters, in an attempt to force the mesh around the edges to follow along the original surface, that on this case lays inside the middle of the extrusion.
      It probably failed miserably because I didn't use level 3 aon all of these surfaces.
    • Tried overlapping the extruded version with the original version, but it lead to having half of the faces on one "faceZone" and the others on another "faceZone"...
Either way, the reported problem here is somewhat fixed with the #4.

Best regards,
Bruno

hfs November 18, 2012 19:33

Thank you very much for your tries and detailed answer

really appreciate it.

I will try your solution with 2 snapping phases ..

Thanks again!

Kind Regards,

ripudaman October 15, 2013 00:50

Has anyone been able to find a better solution to this problem? Is using two phases of SHM the only way to fix this?

wyldckat October 15, 2013 16:26

Greetings Ripudaman,

OpenFOAM 2.2 is able to snap to patches, but it's still not perfect: http://www.openfoam.org/mantisbt/view.php?id=1038

And it should be able to create baffles, using a similar strategy. I think there is one or two tutorials in OpenFOAM 2.2 that use snappyHexMesh to create baffles...

Best regards,
Bruno

ripudaman October 15, 2013 16:41

Thank you for your reply Bruno. I will explore your citation further.

I have been able to create planar baffles using SHM and use them as boundaries (internal) and applied different stresses on the faces to create fractures. I am now trying to do the same thing for curved fractures.

Best,
Ripu


All times are GMT -4. The time now is 13:05.