CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Case is not 3D or 2D ??? (https://www.cfd-online.com/Forums/openfoam-solving/83093-case-not-3d-2d.html)

blaise December 14, 2010 08:49

Case is not 3D or 2D ???
 
2 Attachment(s)
Hi Foamers,

I am running into a problem with a pure blockMesh grid case. It is a simple circular cylinder (3 dimensional, finite length) in another cylindrical domain (see attached pictures). The blockMesh is done in a way that the innermost cells are wedge shaped. I do this by collapsing two vertices of the respective blocks. The vertices on which the others are being collapsed are in the center of the domain at (0 0 z).
The pictures attached do not show the real grid as it has many cells and slightly confusing gradings, so to make things clearer I left these details out.
When I start my LES calculation (which runs perfectly well with a cuboid instead of the cylinder, and has of course an O-grid structure) I get this error:

[0]
[0]
[0] --> FOAM FATAL ERROR:
[0] Case is not 3D or 2D, LES is not applicable
[0]
[0] From function cubeRootVolDelta::calcDelta()
[0] in file [1]
[1]
[1] --> FOAM FATAL ERROR:
[1] Case is not 3D or 2D, LES is not applicable
[2]
[2]
[2] --> FOAM FATAL ERROR:
[2] Case is not 3D or 2D, LES is not applicable
[2]
[2] From function cubeRootVolDelta::calcDelta()
[2] in file cubeRootVolDelta/cubeRootVolDelta.C at line 72.
[2]
FOAM parallel run exiting

Huhhh? If this grid is not 3D, the earth is a flat disc. So what am I doing wrong here?

Any hint is warmly appreciated!

Thanks in advance!

Pascal.

herbert December 14, 2010 09:03

Hi,

what is checkMesh reporting regarding "Mesh (non-empty, non-wedge) dimensions"?

Regards,
Stefan

blaise December 14, 2010 09:22

checkMesh output
 
Hi Stefan,

sorry, I should have posted this as well - here we go:


-------- snippet -------------
Checking geometry...
Overall domain bounding box (-2.000011128 -2.000011128 0) (1.997266201 1.997266201 1.2)
Mesh (non-empty, non-wedge) directions (0 0 1)
Mesh (non-empty) directions (0 0 1)
***Number of edges not aligned with or perpendicular to non-empty directions: 24196
<<Writing 12500 points on non-aligned edges to set nonAlignedEdges
Boundary openness (-2.83056898103e-16 -2.13649125299e-16 -2.01622418729e-16) OK.
Max cell openness = 2.51676265652e-16 OK.
Max aspect ratio = 91.4751493518 OK.
Minumum face area = 1.17191508658e-05. Maximum face area = 0.055424148824. Face area magnitudes OK.
Min volume = 9.3753206926e-07. Max volume = 0.00443393190592. Total volume = 15.000079513. Cell volumes OK.
Mesh non-orthogonality Max: 1.50002356678 average: 0.18251629292
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.327643281514 OK.

Failed 1 mesh checks.

----------- snippet end -----------

The 12500 points in set nonAlignedEdges are exactly the total number of points in the case (regarding to paraview information). I do not understand why points appear in a set of non aligned edges, though. When I try to visualize the set in paraview, nothing is displayed.

Regarding the "nonempty, non-wedge" thing, please see above. What does it tell me?

Regards,

Pascal.

herbert December 14, 2010 11:34

Hi Pascal,

it seems that you have patches of type empty in your mesh (defined in constant/polyMesh/boundary) which is not valid for 3-D cases. It is only useable in 2-D cases. Just change the definition of these patches in the above mentioned file into "patch" and your boundary conditions eventually, too, if not alreay done.

Regards,
Stefan

blaise December 15, 2010 03:51

How could I define internal empty patches?
 
5 Attachment(s)
Hi Stefan,

I attach some pictures showing the internal structure of the grid. It turns out that the empty patches you are referring to are not on boundaries, but inside the grid. The edges resp. vertices of the inner cuboid region are collapsed onto the origin (0 0 z) so that the faces of this cuboid disappear. As far as I understand this, those faces are the ones the "empty" boundary type applies to. How am I supposed to apply a different bc to these faces?

No idea...

What do you recommend? Is a structure like this generally impossible in OF?

Thanks,

Pascal.

herbert December 15, 2010 04:12

Hi Pascal,

as I said, the only information you have to edit is inside constant/polyMesh/boundary. Change their type or even delete them if they are showing "nFaces 0".

Regards,
Stefan

blaise December 15, 2010 06:27

Hi Stefan,

I tried to change the type "empty" to "patch", but I get errors saying that a value is required. When I enter a value line, I only can use "uniform" or "nonuniform", which is not applicable here. I tried to set the defaultFaces type to "calculated", but this gives the following error:

-------------------------------------
[3] --> FOAM FATAL ERROR:
[3]
gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch defaultFaces of field U in file "/daten/ShipLES/geom_bodies/zylinder/cyl_blockMesh_LES_10Mz_v0.2/processor3/0/U"
You are probably trying to solve for a field with a default boundary condition.
[3]
[3] From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const
[3] in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 186.
[3]
FOAM parallel run exiting

-------------------------------------

(I am not really sure about the meaning of "calculated" here).

I will now try to apply a "wall" bc to the four faces of the cuboid, as the faces get infinitely small and do not form a real wall, but a singularity with a line shape.

Any other idea?

Thanks and best regards,

Pascal.

herbert December 15, 2010 07:08

Hi Pascal,

please don't mix up patch definition (which should be patch in the file "constant/polyMesh/boundary") and your boundary condition definiton in the respective fields. Which bc in apporiate for you is hard to tell without knowing your case. But it should be something like zeroGradient, fixedValue etc. Calculated can not be used when you want to solve an equation for that field.

Regards,
Stefan

blaise December 15, 2010 09:01

Solved
 
Hi Stefan,

I wasn't precise enough as where to set what (boundary type vs. bc). Anyway, things turned out to be a simple blockMeshDict tuning: I now define the four innermost blocks so that they all use the same pair of vertices to collapse on, and this works fine. What I had before was that I used a single collapsing point for each block, thus implicit defining the four interiour faces that went to defaultFaces (at least that is my understanding). Although the positions of these collapsing vertices were all the same, the faces seemed to be there, though infinitely small.

Thanks a lot for your assistance!

Best regards,

Pascal.

alberto December 16, 2010 02:52

Posting blockMeshDict would be helpful ;-)

blaise December 16, 2010 05:11

blockMeshDict for LES cylinder
 
2 Attachment(s)
Here we go!

This is the final blockMesh with 10 Mio. cells (mind the gradings) and a simplified version for studying purposes. The latter is generally the same, but has different vertex locations and doesn't look very nice. With only 11200 cells it is more laptop compatible. ;-)

In the end I do not know yet if this kind of grid structure runs better than having a real O-grid for the empty cylinder, so I give no guarantee that this blockMesh works, but I will find out soon.

Comments appreciated!

Cheers, Pascal.


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