isoSurface normal
Hi All,
i am facing some problems using sampleIsoSurface to extract the iso surface of alpha1 (interFoam) during the run. The case is 2D and i am simulating a simple drop relaxation. I correctly defined the surface which is triangulated and i extracted the centre and the normal of each triangle. There are two problems: first the normals are not pointing in the same direction (all inward, all outward with respect to the iso surface) but they seem to have random direction. Second i do not understand why, even if the case is 2D (x-y plane), there are some normals with non-zero z component. Does sampleIsoSurface work for 2D? If i do 3D, the problem on the random normal direction remains... Any clue? andrea |
Try filling a bug report in the MANTIS OpenFOAM platform, maybe there is a bug in the code
|
I am not sure it is really a bug or (more likely) i am simply doing something wrong. So here are the steps i used to create the surface.
1) i created a dictionary name "alpha05Dict" and put it in /constant Code:
FoamFile Code:
IOdictionary alpha05Dict Code:
sampledIsoSurface alpha05("alpha05",mesh,alpha05Dict); Code:
pointField pp(alpha05point ); Then i pun some "Info" to print the calculated centers and normals. Code:
Points3((0.028 0.0290354 0.0001) (0.028 0.0290354 3.53975e-06) (0.0280251 0.0290251 9.74915e-05)) //points on a particular face If i plot the vector area obtained with the explicit formula i have the problem mentioned in my previous post: the direction of the vectors seems more or less random (sometime inward, sometime outward) and there are vectors with non-zero z component (case is 2D). I noticed that in isoSurface.H is reported "- does not do 2D correctly, creates non-flat iso surface.", which probably explains why i get strange orientation with 2D. Despite this if I sum up the face area vector magnitude i get the total interfacial area with an error less than 0.002% for a fine mesh, so the triangulated isosurface seems to well represent the 0.5 contourn of the VOF function. I simulated the same case 3D but i still have problem with the orientation of the vectors. Any help will be really appreaciated. |
All times are GMT -4. The time now is 01:59. |