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/)
-   -   [Commercial meshers] Problem when using Pointwise grid with OpenFOAM (https://www.cfd-online.com/Forums/openfoam-meshing/187720-problem-when-using-pointwise-grid-openfoam.html)

quarkz May 13, 2017 12:15

Problem when using Pointwise grid with OpenFOAM
 
2 Attachment(s)
Hi,

Previously, I was running a blunt wedge case with BlockMesh. The mesh was created by my colleague. Now I'm trying to draw the same grid in Pointwise and export it to OpenFOAM to use. However, I have problem running it.

I have some questions.

1. As shown attached, the grid is structured 2D. Do I have to change it to 3D or unstructured?

2. Based on the boundary condition (BC) shown, I have assigned BC in Pointwise.

For my case, the original BC are:

For P:

dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1;
boundaryField
{
inlet
{
type fixedValue;
value uniform 1;
}
outlet
{
type zeroGradient;
}
bottom
{
type zeroGradient;
//type symmetryPlane;
}
top
{
type fixedValue;
value uniform 1;
}
Walls
{
type zeroGradient;
}
defaultFaces
{
type empty;
}

For T:

dimensions [0 0 0 1 0 0 0];

internalField uniform 1;

boundaryField
{
inlet
{
type fixedValue;
value uniform 1;
}

outlet
{
type zeroGradient;
}

bottom
{
type zeroGradient;
//type symmetryPlane;
}

top
{
type fixedValue;
value uniform 1;
}

Walls
{
type zeroGradient;
}

defaultFaces
{
type empty;
}

For U:

dimensions [0 1 -1 0 0 0 0];

internalField uniform (5.0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (5.0 0 0);
}

outlet
{
type zeroGradient;
}

bottom
{
type slip;
}

top
{
type fixedValue;
value uniform (5.0 0 0);
}

Walls
{
type slip;
}

defaultFaces
{
type empty;
}


However, running rhoCentralFoam, I got the error:

--> FOAM Warning :
From function polyBoundaryMesh::groupPatchIDs() const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 461
Patch wall specifies a group wall which is also a patch name. This might give problems later on.
Reading field U



--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type symmetryPlane and patchField type slip

file: /home/users/nus/tsltaywb/OpenFOAM/tsltaywb-3.0.1/run/Testcases/blunt_wedge/0/U.boundaryField.slip from line 37 to line 37.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /app/OpenFOAM-3.0.1/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 172.

FOAM exiting


I guess the error is due to my BC. So how should I set my BC to make it work?

Thanks!

quarkz May 13, 2017 12:32

Just realised by checking the old polyMesh files that I should be using patch instead... It's running.... hopefully with the correct result :-)

jahangir May 15, 2017 17:26

Hi quarkz
For analysing the 2d problem in OpenFoam you must use 3d mesh ( just extrude your grid in z direction by one cell).
For the faces you have in z direction you must use empty as boundary condition.

Sent from my MotoG3 using CFD Online Forum mobile app

quarkz May 16, 2017 21:50

Thanks jahangir for the tip. However, Pointwise automatically creates the front/back BC so I'm able to import into OpenFOAM. Maybe the newer Pointwise version has this capability.

tanmay singhal April 17, 2020 16:57

I have the same issue
 
sir i have similar geometry and i am facing the same issue.


In hy2foam tutorial problem (blunt cone), there is no symmetry BC in the boundary file rather there are wedge as BC for 2 planes. But for pointwise we have to define one bc as symmetry plane and addiionally i have to define wedge on two bc's. How did you resolved the issue?


Thanks in advance.


here is the boundary file attached
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}

6       
(
    FARFIELD
    {
        type patch;
        nFaces 60;
        startFace 7080;
    }
    OUTLET
    {
        type patch;
        nFaces 60;
        startFace 7140;
    }
    SYMM
    {
        type symmetryPlane;
        nFaces 60;
        startFace 7200;
    }
    wall
    {
        type wall;
        nFaces 60;
        startFace 7260;
    }
    Base
    {
        type wedge;
        nFaces 3600;
        startFace 7320;
    }
    Top
    {
        type wedge;
        nFaces 3600;
        startFace 10920;
    }
)


quarkz April 17, 2020 23:10

In newer Pointwise ver, you just do everything in 2D and then export it to OF. PW will convert it to 3D for OF use. no need to extrude.

However, what you want should be something axis symmetric. In that case, you will need to rotate your 2d plane by about +- 2.5deg and assign the 2 sides as wedge. You may need to shift your body upwards by abt 1% before you do your rotation (assuming at the origin). Else, PW will complain during your OF export that it failed as it has created some geometry not accepted by OF.

Hope it helps.

tanmay singhal April 19, 2020 22:27

Quote:

Originally Posted by quarkz (Post 766238)
In newer Pointwise ver, you just do everything in 2D and then export it to OF. PW will convert it to 3D for OF use. no need to extrude.

However, what you want should be something axis symmetric. In that case, you will need to rotate your 2d plane by about +- 2.5deg and assign the 2 sides as wedge. You may need to shift your body upwards by abt 1% before you do your rotation (assuming at the origin). Else, PW will complain during your OF export that it failed as it has created some geometry not accepted by OF.

Hope it helps.


I am interested in the stagnation point and the above mentioned approach will effect that property as stagnation point will be about axisymmetric axis. I checked online about extrude2dMesh option in openfoam but was unable to implement it.

LVH_CFD June 16, 2020 04:05

Something that helped for me was using: renumberMesh - overwrite

after importing my exported pointwise files into the polyMesh folder.

BruceYe July 30, 2021 02:57

Hi, I am performing hy2Foam as well and I met with the same problem as you. I am trying to perform pointwise to generate the wedge mesh but when I checkmesh, it comes out to report 1 failed mesh check, and it is said "Number of edges not aligned with or perpendicular to non-empty direction". Have you figured out the way to generate wedge mesh by pointwise? I would appreciate it a lot if u could help me solve such problem.

Quote:

Originally Posted by tanmay singhal (Post 766219)
sir i have similar geometry and i am facing the same issue.


In hy2foam tutorial problem (blunt cone), there is no symmetry BC in the boundary file rather there are wedge as BC for 2 planes. But for pointwise we have to define one bc as symmetry plane and addiionally i have to define wedge on two bc's. How did you resolved the issue?


Thanks in advance.


here is the boundary file attached
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}

6       
(
    FARFIELD
    {
        type patch;
        nFaces 60;
        startFace 7080;
    }
    OUTLET
    {
        type patch;
        nFaces 60;
        startFace 7140;
    }
    SYMM
    {
        type symmetryPlane;
        nFaces 60;
        startFace 7200;
    }
    wall
    {
        type wall;
        nFaces 60;
        startFace 7260;
    }
    Base
    {
        type wedge;
        nFaces 3600;
        startFace 7320;
    }
    Top
    {
        type wedge;
        nFaces 3600;
        startFace 10920;
    }
)




All times are GMT -4. The time now is 01:59.