|
[Sponsors] |
July 22, 2014, 16:07 |
FORTRAN coding for AMR
|
#1 |
New Member
Harshavardhana Srinivasan
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
Hello!
I am writing a code to perform Mesh refinement, i have a starcd mesh file (2d), i have written a code where i read the mesh file, i have the cell data and the vertex data read separately and have also defined the neighbours. I want to refine particular area of cells, maybe to create a circle and refine the cells that fall into it... i have also created the circle within the grid, am finding it difficult to write a condition to mark the cells that fall under the circle, it would be great if someone could suggest me a solution for this or any other strategy... Thanks in advance |
|
July 23, 2014, 14:59 |
|
#2 |
Senior Member
|
Dear Harshavardhana,
your question is not easy to understand. The only thing which pops up in my mind is that you should check for (quantities in square brackets are optional for 3D): given the coordinates x, y [, z] of the cell center (or any other relevant cell-related coordinate) given the coordinates of the circle/sphere center xc, yc [, zc] given the circle/sphere radius rc if ((x-xc)^2+(y-yc)^2[+(z-zc)^2]>=rc^2) then !Point out of the circle/sphere else !Point in the circle/sphere endif But i hardly think that after all that you did you stopped on this. So, please, elaborate more. |
|
July 23, 2014, 15:04 |
|
#3 |
New Member
Harshavardhana Srinivasan
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
Dear Paolo,
What i want to do now is to just test my algorithm for AMR, i dont have a solution where i can use the truncation error to flag cells for refinement, so am creating a circle within the grid and flagging the cells falling under the circle for refinement. I have created the circle and am stuck on how to flag the cells within the circle now... Or am looking for some-other way to flag cells for refinement.. Thank you. |
|
Tags |
fortran code, mesh adaptation, refinementregion |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 06:37 |
Using Fortran with CFX: How to connect Fortran to CFX? | l.te | CFX | 0 | October 21, 2012 12:42 |
Fortran CFD coding on Macintosh OS | 9mile | Main CFD Forum | 2 | August 23, 2009 02:38 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 21:45 |
fortran coding for explosion | dj | CFX | 0 | September 25, 2003 02:33 |