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

[Other] Meshing an ellipse

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mturcios777

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2014, 04:53
Default Meshing an ellipse
  #1
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 13
Sujatha is on a distinguished road
Hi all,
I wanted to create an elliptical geometry in interFoam. An ellipse of 43mm major axis and 12.2mm semi minor axis. What I am trying is actually 1/4 of a circle cut along a plane parallel to the diameter, like an ellipse and not a quarter circle.
I am working with 'blockmesh' and tried to use 'arc' edge but was in vain probably as it is meant for circular arcs. The 'spline' edge also didn't worked as it gave lines and not curves between that points. The 'simpleSpline' edge failed with errors.
Can any one please help me with some idea to mesh the ellipse.
Any hint will be a privilege and is greatly appreciated.

Thanks in advance
regards
Sujatha
Sujatha is offline   Reply With Quote

Old   January 30, 2014, 06:34
Default
  #2
Member
 
Join Date: Nov 2012
Posts: 58
Rep Power: 14
startingWithCFD is on a distinguished road
"spline" works great for me.
Are you sure you have used the right coordinates for the internal points?
Would you like to post your blockMeshDict?
startingWithCFD is offline   Reply With Quote

Old   January 30, 2014, 06:47
Default
  #3
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 15
Ruli is on a distinguished road
Dear Sujatha,
have you tried polyLine? It connects two vertices along a defined set of points with lines between these points.
You could generate these points with some other software with very close distance to each other.
As we are simulating discretized, I don`t think this little 'linearity' does matter.

Quote:
Originally Posted by Sujatha View Post
The 'simpleSpline' edge failed with errors.
How do the erros look like?

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   January 30, 2014, 18:03
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
You could make a circular geometry using arc, then use transformPoints to make it into an ellipse.
mturcios777 is offline   Reply With Quote

Old   January 31, 2014, 00:48
Default
  #5
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 13
Sujatha is on a distinguished road
Sir startingWithCFD, sir Ruli, sir mturcios777, Thanks a million for your responses.
[ "spline" works great for me.
Are you sure you have used the right coordinates for the internal points?
Would you like to post your blockMeshDict?]


I got straight lines with 'spline' but I wanted curves, that is what I meant. My blockmeshdict is as below,
[/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
(0 0 0)
(124.79 0 0)
(168.21 0 0)
(293 0 0)
(293 200 0)
(168.21 200 0)
(124.79 200 0)
(0 200 0)
(0 0 1)
(124.79 0 1)
(168.21 0 1)
(293 0 1)
(293 200 1)
(168.21 200 1)
(124.79 200 1)
(0 200 1)

);

blocks
(
hex (0 1 6 7 8 9 14 15) (20 20 1) simpleGrading (5 1 5)
hex (1 2 5 6 9 10 13 14) (10 20 1) simpleGrading (5 1 5)
hex (2 3 4 5 10 11 12 13) (20 20 1) simpleGrading (5 1 5)
);

edges
(
spline 1 2
(
(125.74 4.8344 0)
(129.1966 9.7233 0)
(146.5 12.2 0)
(154.4897 13.123 0)
(163.8034 9.7233 0)
(167.2698 4.8344 0)
)

spline 9 10
(
(125.74 4.8344 1)
(129.1966 9.7233 1)
(146.5 12.2 1)
(154.4897 13.123 1)
(163.8034 9.7233 1)
(167.2698 4.8344 1)
)
);

patches
(
);

mergePatchPairs
(
);

// ************************************************** *********************** //],

Sir Ruli, my error while using 'simpleSpline' is as below
[--> FOAM FATAL ERROR:
Unknown curvedEdge type simpleSpline

Valid curvedEdge types are

4
(
arc
line
polyLine
spline
)


From function curvedEdge::New(const pointField&, Istream&)
in file curvedEdges/curvedEdge.C at line 96.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Foam::curvedEdge::New(Foam::Field<Foam::Vector<dou ble> > const&, Foam::Istream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#3 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#4 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libblockMesh.so"
#5
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/blockMesh"
#6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#7
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/blockMesh"
Aborted (core dumped)
]
Sujatha is offline   Reply With Quote

Old   January 31, 2014, 00:52
Default
  #6
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 13
Sujatha is on a distinguished road
Sir Ruli,
Can you kindly specify some software that will help make points in the curve.

Sir mturcios777,
Sir kindly explain about the 'transformPoints' some time at your convenience.

Thank you all again,
Regards
Sujatha
Sujatha is offline   Reply With Quote

Old   January 31, 2014, 04:36
Default
  #7
Member
 
Join Date: Nov 2012
Posts: 58
Rep Power: 14
startingWithCFD is on a distinguished road
You have too few points in the x-direction in that block.
Please see the attached images, the modified done with 40 points instead of 10.
The mesh does not look really good, you might want to reconsider your blocks.
Attached Images
File Type: jpg original.jpg (24.4 KB, 112 views)
File Type: jpg modified.jpg (26.3 KB, 103 views)
startingWithCFD is offline   Reply With Quote

Old   January 31, 2014, 05:45
Default
  #8
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 15
Ruli is on a distinguished road
Dear Sujatha,

Quote:
Originally Posted by Sujatha View Post
Sir Ruli,
Can you kindly specify some software that will help make points in the curve.
If you know the functions of your ellipse curves you could use Excel or Matlab or Scilab for calculation of discrete points.

As startingWithCFD has pointed out, mesh refinement is critical to get a nice 'round' mesh. Keep in mind, the connections between the points in OF are always linear, as we are generating plane surfaces.

Best regards
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   January 31, 2014, 06:54
Default
  #9
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 13
Sujatha is on a distinguished road
Thank you sir startingWithCFD and Sir Ruli.
So I will improve the refinement and will try by increasing the defined points in the edges.

Sir, I am a beginner so may I put one more question, I get some skewness errors when ever I try to increase the no of cells. Are there some ways to prevent that??
Regards
sujatha
Sujatha is offline   Reply With Quote

Old   January 31, 2014, 14:34
Default
  #10
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Tranform points allows you to perform operations such as scaling, rotation and translation of mesh points. For example, if you have meshed a circle that is in the x-y plane with unit radius and wish to generage an ellipse with semimajor axes a, b (in the x, y directions respectively), then you could use the following command:

Code:
transformPoints -scale (a b 1)
Run the command with the help option for more information. Note that because you are scaling your original circular mesh will need to be denser in the the regions you are expanding and sparser in regions you are compressing
Sujatha likes this.
mturcios777 is offline   Reply With Quote

Old   January 31, 2014, 20:58
Default
  #11
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 13
Sujatha is on a distinguished road
Thank you sir, mturcios777.
Sujatha 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
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 11:49
[ICEM] Flow channel meshing problems StefanG ANSYS Meshing & Geometry 19 May 15, 2012 07:44
[ANSYS Meshing] Meshing strategy for External Flows Hybrid ANSYS Meshing & Geometry 0 January 24, 2012 15:27
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03
Volume Meshing & Face Meshing? singularity of grid ken FLUENT 0 September 4, 2003 12:08


All times are GMT -4. The time now is 16:53.