
[Sponsors] 
June 9, 2012, 13:20 
Creating circular shape through programming

#1 
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 
Hello Everyone,
I want to create a circle with help of programming for computation. I tried by equation of circle but i am not able to compute with the entire circle. Can i get guidance on how to create circle and then compute around it Thank you 

June 10, 2012, 02:18 

#2 
Senior Member

I can not catch what is the problem?
could you please detail it. create a circle for what? grid generation? 

June 11, 2012, 11:47 

#3 
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 
Yes, for grid generation and then computing in that points


June 11, 2012, 18:52 

#4 
Senior Member

try gmesh
http://geuz.org/gmsh/ 

June 13, 2012, 12:50 

#5 
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 
Thank you sir,
But gmesh is the software, i wanted to write my own C code to generate circle and then compute 

June 13, 2012, 17:54 

#6 
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 551
Rep Power: 11 
I guess you need to state your problem more clearly before we can try to help!


June 13, 2012, 18:29 

#7  
Senior Member

Quote:
if you try to generate the unstructured grid, try find some free procedure on this page http://people.sc.fsu.edu/~jburkardt/...c/cpp_src.html hope this help you 

June 15, 2012, 12:07 

#8 
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 
Sir, I am trying to make my own C code to examine the flow over a cylinder and for the same i need to create a circle and then compute around it i.e, solve momentum and continuity equation.


June 15, 2012, 14:18 

#9 
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 551
Rep Power: 11 
So is your problem related to the meshing of the geometry, or to the solution of the associated PDEs?


June 15, 2012, 22:45 

#10 
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 515
Rep Power: 9 
?
Is the answer as simple as this: x = r*cos(theta) y = r*sin(theta) It seems that way. 

June 16, 2012, 05:46 

#11 
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 

June 16, 2012, 06:30 

#12  
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 551
Rep Power: 11 
Quote:
Quote:
So please restate your problem and show us the steps you have taken to solve it, then we might help. just restating "I have a problem" won't enable us to help you! 

June 16, 2012, 06:31 

#13  
Member
Join Date: Mar 2009
Posts: 72
Rep Power: 8 
Quote:
If staircase shapes are not allowed then you could use grid transformation or unstructured grid.
__________________
"Trying is the first step to failure."  Homer Simpson 

June 16, 2012, 09:06 

#14  
New Member
Lokesh Agarwal
Join Date: Feb 2012
Posts: 6
Rep Power: 5 
Quote:
I want to create a 2D rectangular unstructured grid with a circle of diameter 0.2 times the smallest side of the rectangle. The circle is on the center of the rectangular grid The grid is finer near the circle and coarse away from it. So, i want to create this grid in x, y coordinate using "for" and other iterative loops in c programming (also using arrays) After generating grid i will use these grid points to solve NS equations. 

June 16, 2012, 09:37 

#15 
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 551
Rep Power: 11 
Well, how do you want to create the grid? There are many ways to do it. You can use an elliptic solver, triangulate by Delauny.... what type of grid? structured hexas? triads?
I would recommend you do some reading up on grid generation and identify what requirements you have before starting with this... 

Tags 
circle, programming 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
benchmark: flow over a circular cylinder  goodegg  Main CFD Forum  12  January 22, 2013 12:47 
Fluent3DMeshToFoam  simvun  OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...  48  May 14, 2012 05:20 
Problem in running ICEM grid in Openfoam  Tarak  OpenFOAM  6  September 9, 2011 17:51 
+ shape circular pipe  meshing possible?  Selina Tracy  Main CFD Forum  2  January 16, 2003 14:31 
CREATING A VERTICAL CIRCULAR PIPE  sanjib das sharma  CFX  15  August 2, 2001 06:11 