CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Truly 3D Mesh (https://www.cfd-online.com/Forums/openfoam-meshing/61789-truly-3d-mesh.html)

tsherk86 July 22, 2008 14:39

Truly 3D Mesh
 
Hello,
I've been working on creating a mesh for a cylindrical annulus, but have had no luck finding out how to extends the mesh points INSIDE the annulus so that there are grid points to solve the solution inside the cylinder rather than just on the outside. I can't seem to find out how to do this anywhere. Am I missing something? OpenFOAM wouldn't solve all the way through the cylinder if I only had grid points on the exteriors of the annulus would it? i.e., I believe the fluid flow would appear the same the entire way through the cylinder along the z direction as I have no mesh on the inside connecting the boundaries.

Thanks for your help!

-Trevor

tsherk86 July 22, 2008 15:58

Here is a picture of my mesh s
 
Here is a picture of my mesh so far
http://www.cfd-online.com/OpenFOAM_D...ges/1/8436.jpg

tsherk86 July 22, 2008 16:07

And here is my blockMesh file:
 
And here is my blockMesh file:
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif blockMeshDict

cedric_duprat July 23, 2008 02:57

I Trevor, just small questi
 
I Trevor,

just small questions, what do you want to do ?

- solve Navier-Stokes equation inside the "internal"pipe ? (but no mesh ...)
- solve Navier-Stokes inside the annulus part ?

well, where is your fluid, ect ...
Can you tell me a little bit more just for me to help you (if I can) because, if you need to solve a cylindrical annulus, I don't understand why you need solution in the internal pipe ...

Cedric

eugene July 23, 2008 06:47

To make a cylinder, you need 1
 
To make a cylinder, you need 12 blocks. 4 for the core region and 8 around the outside.

When joined together, the 4 core blocks will expose 8 facets in the radial direction. Seen end on, you will distort them to look like an octagon. To each of these 8 facets you then attach one of the 8 outer blocks to interface with the outer cylinder.

http://www.cfd-online.com/OpenFOAM_D...ges/1/8448.gif

tsherk86 July 23, 2008 08:44

Hello Cedric, The fluid is
 
Hello Cedric,

The fluid is inside the annulus, so between the inner wall and the outer wall. I wish to solve Navier-Stokes inside the annulus part which is empty of mesh points. My understanding of simulation and modeling is that when solving these equations, the solution is iterated over the mesh points. Therefore, to model the fluid inside the annulus I must have grid points inside the annulus and not just on the walls. Is this correct? If so, I am wondering how to connect the inner and outer walls with a grid inside the annulus.

The problem is the differentially heated rotating annulus problem. Perhaps you've heard of this classic experiment.

Thanks!

-Trevor

hsieh July 23, 2008 10:46

Hi, Trevor, It does look li
 
Hi, Trevor,

It does look like you have grid points inside domain you are interested. I run your blockMeshDict and plotted the mesh and a clip of the mesh.

http://www.cfd-online.com/OpenFOAM_D...your_image.gif

Pei

hsieh July 23, 2008 10:52

Hi, Trevor, It does look li
 
Hi, Trevor,

It does look like you have grid points inside domain you are interested. I run your blockMeshDict and plotted the mesh and a clip of the mesh.

http://www.cfd-online.com/OpenFOAM_D...ges/1/8453.png
http://www.cfd-online.com/OpenFOAM_D...ges/1/8454.png

Pei

cedric_duprat July 23, 2008 11:03

Hi trevor, As pei show us,
 
Hi trevor,

As pei show us, it seems that you aldready have some points inside the annulus region.

These points correspond to the line :
hex (0 1 2 3 16 17 18 19) (10 10 10) simpleGrading (1 1 1)
of the blockMeshDict.
For exemple here, the (10 10 10) is the number of points in each direction (x, y z) for the first block.
The same for the other.
If you are still not sure (I hope you are now) you can still do a checkMesh of your case and you should see the number of nodes, cells, ect ... of your geometry

tsherk86 July 23, 2008 12:43

Sorry, I'm not convinced still
 
Sorry, I'm not convinced still. Paraview must fill in those lines so that it appears to have mesh points inside. I have done the clip filter with a simple box too and it shows the same effect - making it appear to have grid points all the way through, but they don't. Try doing the clip filter at, say, a 45 degree angle and you will see what I mean. Those lines you see in Pei's picture are created by ParaView for some reason.

Thanks,
Trevor

hsieh July 23, 2008 15:31

Hi, Trevor, OK, this is a c
 
Hi, Trevor,

OK, this is a cut out of the original mesh. It will hard to believe that there are no nodes inside the domain.

http://www.cfd-online.com/OpenFOAM_D...ges/1/8463.png

Pei

hsieh July 23, 2008 15:39

Hi, Trevor, Forgot to menti
 
Hi, Trevor,

Forgot to mention this:

Look in constant/polyMesh/Points file, it lists 9680 points. This is 11*11*80 - matches the number of points you specified.

Pei

tsherk86 July 23, 2008 16:54

Hello Pei, Well, after seei
 
Hello Pei,

Well, after seeing that picture I now believe you are right. Thanks! I will now try my simulation.

I just assumed the points weren't inside because of Paraview actually. When I would look at the mesh in Paraview and zoom inside, there was no inside grid. Also, when I would run the tutorial cases, the fluid flow would appear the same through all slices of the geometry. I guess they must not have been intended to be 3D cases. This is great! I hope you are right.

Thank you very much for your time and assistance.


-Trevor

cedric_duprat July 24, 2008 02:48

Hi Trevor and Pei "I hope y
 
Hi Trevor and Pei

"I hope you are right" .... no doubt, we are :o)

Pei, nice picture the last one, I'm really curious to know how you managed to get that with paraView ?
Did you decompose the mesh for parallel run and it correspond to one processor mesh ?

Thanks,

Cedric

hsieh July 24, 2008 07:43

Hi, Cedic, In paraview 3.2.
 
Hi, Cedic,

In paraview 3.2.1,

1. click "Edit", select "Select Cells Through"
2. select the area of mesh you are interested using the mouse.
3. Click "Filter", then, "Alphabetical", then, select "Extract Selection".
4. click "Copy Active Selection".
5. click "Apply"
6. click "Display"
7. under "Style", select "Surface With Edges" under Representation.

Pei
PS: hope I did not miss anything.

cedric_duprat July 25, 2008 03:31

Hi Pei, Thank you, I'll try
 
Hi Pei,

Thank you, I'll try with the old version of paraView first.
And maybe with the new one in a couple of weeks.

Cedric

tsherk86 July 31, 2008 17:28

Hello again! I am having some
 
Hello again!
I am having some trouble inputting the equations for the model into OpenFOAM. Specifically, for dU/dt (U is the vector fluid velocity), I need to calculate r, the radius ((x^2+y^2)^(1/2)), and the cylindrical unit vector r, i_r, which, when expressed in terms of cartesian coordintes, I THINK is cos(arctan(y/x))*i_x + sin(arctan(y/x))*i_y, where x and y are the usual cartesian coordinates.

I think I can use mag(U) to calculate r (?), but from my reading I believe OpenFOAM treats tensors as a unit, and does not look at individual components, such as x and y... anyhow, I am not sure how to do handle finding x and y. I tried U.component(0) and U. component(1) for x and y, and get a floating point exception. So I gather my other problem is that U.y is sometimes 0...

Any suggestions would be greatly appreciated!!

Thanks,
Trevor

tsherk86 August 1, 2008 09:57

Never mind! I think I figured
 
Never mind! I think I figured out another way to do the problem.

T.D. September 15, 2010 11:50

Hi Guys, i am new in openfoam, my question is that: if i want to the solve the navier stokes eqns in cylindrical coordinates, i must just define my coordinates system to cylindrical one (r, theta,z)? if so, what about the operators like "laplacian","divergence", for example: div(phi), they will be automatically used in cylindrical coordinates? or we must write new definitions for them in cylind. coord.?
thanks a lot


All times are GMT -4. The time now is 19:27.