# Meshing an ellipse

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

 January 30, 2014, 04:53 Meshing an ellipse #1 New Member   Join Date: Jul 2013 Posts: 27 Rep Power: 6 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

 January 30, 2014, 06:34 #2 Member   Join Date: Nov 2012 Posts: 58 Rep Power: 7 "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?

January 30, 2014, 06:47
#3
Member

Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 8
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 The 'simpleSpline' edge failed with errors.
How do the erros look like?

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus

 January 30, 2014, 18:03 #4 Senior Member     Marco A. Turcios Join Date: Mar 2009 Location: Vancouver, BC, Canada Posts: 735 Rep Power: 21 You could make a circular geometry using arc, then use transformPoints to make it into an ellipse.

 January 31, 2014, 00:48 #5 New Member   Join Date: Jul 2013 Posts: 27 Rep Power: 6 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 > 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) ]

 January 31, 2014, 00:52 #6 New Member   Join Date: Jul 2013 Posts: 27 Rep Power: 6 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

January 31, 2014, 04:36
#7
Member

Join Date: Nov 2012
Posts: 58
Rep Power: 7
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
 original.jpg (24.4 KB, 61 views) modified.jpg (26.3 KB, 58 views)

January 31, 2014, 05:45
#8
Member

Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 8
Dear Sujatha,

Quote:
 Originally Posted by Sujatha 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

 January 31, 2014, 06:54 #9 New Member   Join Date: Jul 2013 Posts: 27 Rep Power: 6 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

 January 31, 2014, 14:34 #10 Senior Member     Marco A. Turcios Join Date: Mar 2009 Location: Vancouver, BC, Canada Posts: 735 Rep Power: 21 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.

 January 31, 2014, 20:58 #11 New Member   Join Date: Jul 2013 Posts: 27 Rep Power: 6 Thank you sir, mturcios777.

 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 [ANSYS Meshing] Can I use ANSYS Meshing for manual meshing? Kirjain ANSYS Meshing & Geometry 6 November 30, 2015 09:11 Nutrex Main CFD Forum 4 July 29, 2008 11:03 Ken Main CFD Forum 0 September 4, 2003 11:09 ken FLUENT 0 September 4, 2003 11:08 Gauthier Lambert Main CFD Forum 1 August 3, 2000 09:22

All times are GMT -4. The time now is 18:03.