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/)
-   -   [mesh manipulation] Converting a 2Dmesh to axisymmetric (https://www.cfd-online.com/Forums/openfoam-meshing/61473-converting-2dmesh-axisymmetric.html)

lindstroem August 8, 2012 05:25

Hi again..

as reported before, I have the problem, that after MAM checkMesh or collapsEdges crashes with a floating Point Exception. I had this issue before but could solve it, by modifying the boundary of the mesh.
Now I am facing this problem again, but cannot figure out, where the problem comes from. I'd be glad if someone could check the case.
https://dl.dropbox.com/u/587565/gly8...wBackup.tar.gz

Thanks in advance!
Lindstroem

gschaider August 20, 2012 16:37

Quote:

Originally Posted by lindstroem (Post 375985)
Hi again..

as reported before, I have the problem, that after MAM checkMesh or collapsEdges crashes with a floating Point Exception. I had this issue before but could solve it, by modifying the boundary of the mesh.
Now I am facing this problem again, but cannot figure out, where the problem comes from. I'd be glad if someone could check the case.
https://dl.dropbox.com/u/587565/gly8...wBackup.tar.gz

Thanks in advance!
Lindstroem

Can't reproduce your problem. MAM and collapseEdges work without problem for me. Could you be more specific about the OF-version you use and the exact commands you used

lindstroem August 21, 2012 05:31

Hi Bernhard,

thanks for your help. Your posting made me starting from the scratch again. The problem was that I used the MAM-version for 1.4.1 to 1.7.x although my OF-version was 2.0.0. I had a wrong alias.
I always thought it was a problem of my case!

Thanks!!

vahid.najafi August 22, 2012 02:13

plz help me dear foamers:
 
3 Attachment(s)
Hi foamers.
I am trying to convert the 2D mesh to 3D!
my real geometry is (pic1) but i want to Use 2D for my solver(because in 3D very slow Running speed) ,and for this reason i made 2D(pic2).
can I Change the type of frontAndBack and make 2D to 3D (pic3)???
my width 44mm.

lindstroem August 22, 2012 04:36

Hello Vahid,

the width of your geometry does not matter (as you want to run a 2D simulation, if it does matter, it is not 2D anymore). Just make sure, it is only one cell big.
Yes, frontAndBack should be of type empty.

Greetings

vahid.najafi August 22, 2012 07:39

Hi lindstroem
 
Hi lindstroem ,thanks for your answer.
your answer means should I use 3D geometry ???(because width of my real geometry is 44mm!!!)

lindstroem August 22, 2012 08:45

Hi again,

two general things:
- OpenFOAM uses for 2D simulations a mesh with only one cell in the "z-direction" (or which axis you choose to be perpendicular to the 2D-plane you simulate).
So the mesh is basically 3D, but the boundaries (defined as empty) indicate for OF that it is a 2D case. (see U-126 in the User guide)

- if you do a 2D simulation, your depth is "infinite". Otherwise it would be 3D if you want to account for the dependence on the depth. So you should make yourself clear what you want to simulate.

I cannot recommend you what you should do, because it depends on what you want to solve for.

vahid.najafi August 22, 2012 11:30

Hi Dear lindstroem .
thanks a lot for your Clear answer.

ali jafari September 25, 2012 04:02

Hi
I start OF recently. I have O.F 1.5 dev . I download makeAxialmesh and try compile it according to threads but some errors appear (repatchPolyTopoChanger.H file error)
please guide me for compiling this utility step by step. (specific paths ; specific commands ...)

gschaider September 25, 2012 04:17

Quote:

Originally Posted by ali jafari (Post 383458)
Hi
I start OF recently. I have O.F 1.5 dev . I download makeAxialmesh and try compile it according to threads but some errors appear (repatchPolyTopoChanger.H file error)
please guide me for compiling this utility step by step. (specific paths ; specific commands ...)

I've got to give the question back: which version of makeAxialMesh did YOU download?

Anyway: try getting this version (according to the README it should work with 1.5-dev but I can't check because I don't have such an old installation) with the following command

svn checkout https://openfoam-extend.svn.sourcefo...MakeAxialMesh/

go to the makeAxialMesh-directory and do the usual wmake. But all that is described on http://openfoamwiki.net/index.php/Contrib_MakeAxialMesh anyway

ali jafari September 27, 2012 05:01

Quote:

Originally Posted by amin144 (Post 356157)
Hello Dear Foamers:)
Especially Dear Bernhard;)

I want to run testCase and doing below steps:
(I think this thread need a post that describe process step by step like this:()

(My OF version: openFoam 1.5-dev)
1-Download files of utility and after Compile makeAxilMesh using "wmake all"---> well done
2-Download "testCase" files
3-Go to testCase Directory
4-Run "blockMesh"----> well done
5-Run "makeAxialMesh -axis movingWall -wede frontAndBack -overwrite" --->well done
6-Run "paraFoam" and can see wedge shape grid
7-Run "collapseEdges 0.0001 175 -overwrite" shows below message:


Create time

Create polyMesh for time = 0

Merging:
edges with length less than 0.0001 meters
edges split by a point with edges in line to within 175 degrees

Collapsing 21 small edges
Morphing ...
Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:4.36194e-05
Collapse area factor:1e-09
Collapse area:4.36194e-14
Collapsing 0 small high aspect ratio faces
Writing collapsed mesh to time 0
End


8-Run "icoFoam" and it runs without any problem!

-----------------------------------------------------
-----------------------------------------------------
Queations:

1))Is my Steps all True? Isn't anything wrong?

2))What does this Case physically show ? Only a full closed cylinder whitout any flow?

3))Any body can mail me a test case for Flow in a simple axisymmetric pipe?
I will appreciat if anybody upload a pipe case for using everyone for test beside this simple and maybe unused case :(

-------------------------------------------------------
-------------------------------------------------------
shariatkhah@gmail.com

Thanks:)

-----------------------------------
I do your steps but when I run parafoam and click on apply . parafoam exiting and this error appears :
--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type symmetryPlane and patchField type zeroGradient

file: /home/ali/USER_RUN/tutorials/axialCavity/0/p::boundaryField::movingWall from line 34 to line 34.

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

FOAM exiting

Segmentation fault (core dumped)
-------------------------------------------------------------
I use checkMesh after blockMesh and that's OK , and I use checkMesh after makeAxialMesh but it show
" Failed 4 mesh checks."
how do I understand that I compile MakeAxialMesh correctly ?

amin144 September 28, 2012 14:35

Dear Ali
Did you tested testCase or another case?
what is your OF version?

ali jafari September 29, 2012 01:29

Quote:

Originally Posted by amin144 (Post 384108)
Dear Ali
Did you tested testCase or another case?
what is your OF version?

I used testcase. I use openfoam2.1.1 because makeaxialmesh didn't compiled on OF 1.5-dev !!

amin144 September 29, 2012 02:58

I think you should reinstall you OF 1.5 dev
and you couldn't run test case or your case?
I can't understand.

feel free to mail me:
amin_144@yahoo.com

amin144 September 29, 2012 09:31

AnyOne have tested makeAxialMesh in OF 2.1.1 ?
 
Hi Dear Foamers!

AnyOne have tested makeAxialMesh in OF 2.1.1 ?
I have used it in 1.5dev before and it worked correctly as I said in my other posts in this thresd.
but today I used it in OF 2.1.1
I compiled the version which is written for OF 2.0.0 and there isn't especial version of makeAxialMesh for OF 2.1.1 !!
but when I ran "check mesh" (after collaspsing edges) it shows an error:

***Wedge patch frontAndBack_pos not planar. Point (0.005 0.06 0.00174478) is not in patch plane by 3.9962e-08 meter.

Any change in code of this utility is needed for OF 2.1.1 ?
TanX very much

tomloh September 30, 2012 05:13

Hi Amin,

I have had this problem before, you shouldn't need to change anything.
See posts between Bernhard and myself in this threat, (post #106 onwards)

Kind Regards,
Tom

emil November 13, 2012 06:18

Hello everybody, just one question is it possible to create a geometry that is symetric around a coordinate axis and not around one of its boundaries?

Thank you!

gschaider November 20, 2012 19:59

Quote:

Originally Posted by emil (Post 391828)
Hello everybody, just one question is it possible to create a geometry that is symetric around a coordinate axis and not around one of its boundaries?

Thank you!

What do you mean with "not around one of its boundaries"? Could you sketch it?

emil November 21, 2012 01:13

Hello,

I managed to avoid it by creating wedge (5 degree slice) mesh in Gambit and then importing it into OpenFoam. I hope that procedure is ok.

And what I ment is if the domain is ofset from x-axis for some measure and I want to revolve it around x-axis and not the boundary

Thank you

rajeshkunwar December 25, 2012 13:39

rotationDict Confusing
 
What is the difference between new mode and old mode...Pls somebody explain it.

gschaider December 25, 2012 16:14

Quote:

Originally Posted by rajeshkunwar (Post 398993)
What is the difference between new mode and old mode...Pls somebody explain it.

old mode is if you specify axis and wege from the command line and therefor the dictionary is not used. This mode does not allow the axis to have an offset

vahid.najafi December 26, 2012 00:34

reply
 
Hi, Dear rajeshkunwar.
Your question not Clear for me!!!plz Explain more about your question?
maybe i can help you!!!
:)

vahid.najafi December 26, 2012 00:35

Hi, Dear rajeshkunwar.
Your question not Clear for me!!!plz Explain more about your question?
maybe i can help you!!!
:)

rajeshkunwar December 27, 2012 03:34

The axis patch type becomes symmetryPlane after using makeAxialMesh in boundary file of polyMesh directory . What boundary type I have to specify in P and U files for symmetryPlane.

vahid.najafi December 28, 2012 16:02

if you done true all steps,you should have Something similar the following lines in your boundary:
frontAndBackPlanes
{
type empty;
}
frontAndBackPlanes_pos
{
type wedge;
}
frontAndBackPlanes_neg
{
type wedge;
}

are you make this lines(wedge) in your boundary in polymesh file?if you see this,so you should add the above lines in P and U files.

rajeshkunwar December 29, 2012 10:26

Hi Vahid. Thank you for replying. my boundary file is below. The axis patch name is Axis.

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

8
(
Axis
{
type symmetryPlane;
nFaces 0;
startFace 19800;
}
Upper_Boundary
{
type patch;
nFaces 100;
startFace 19800;
}
Side_Boundary
{
type patch;
nFaces 100;
startFace 19900;
}
Bottom_Wall
{
type wall;
nFaces 90;
startFace 20000;
}
Source
{
type patch;
nFaces 10;
startFace 20090;
}
frontAndBackPlanes
{
type empty;
nFaces 0;
startFace 20100;
}
frontAndBackPlanes_pos
{
type wedge;
nFaces 10000;
startFace 20100;
}
frontAndBackPlanes_neg
{
type wedge;
nFaces 10000;
startFace 30100;
}


U file in zero folder is below.
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0.0 0 0);

boundaryField
{
Axis
{
type symmetryPlane;

}
Upper_Boundary
{

type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);

}
....


I just wanted to confirm whether it is correct or not.

vahid.najafi December 30, 2012 01:16

Hi dear rajeshkunwar .
I havent time to see your boundary,but I know that you have to run this line:

makeAxialMesh -axis axis -wedge frontAndBackPlane

I think, its better for you to learn it, do this Commands for a simple geometry like Rectangular shape!!!
if your problem don't solve,Ask the problem again,to explain it!!!

rajeshkunwar January 3, 2013 02:47

I have done the same thing what you have suggested. My confusion is regarding the boundary condition of Axis patch.

gschaider January 5, 2013 18:05

Quote:

Originally Posted by rajeshkunwar (Post 399875)
I have done the same thing what you have suggested. My confusion is regarding the boundary condition of Axis patch.

The type of the axis patch has been rewritten as this usually causes the least problems. If the axis patch was also the rotation axis then collapseEdges should remove all faces there anyway and the type of it is irrelevant. Otherwise if you don't like symmetryPlane go to constant/polymesh/boundary and change it there

Andrea_85 January 11, 2013 09:25

Hi all,

where can i download makeAxialMesh for openFoam 2.1.0? svn doesn't work.

thanks

andrea

gschaider January 11, 2013 09:52

Quote:

Originally Posted by Andrea_85 (Post 401380)
Hi all,

where can i download makeAxialMesh for openFoam 2.1.0? svn doesn't work.

The SVN has been temporarily disabled by Sourceforge because ANSYS claims that 6 files (out of thousands) there violate their copyright.

I will look into how to make stuff that is undisputed available in the meantime, but probably can't do so before monday

If somebody who recently downloaded it (makeAxialMesh) could make a tarball of the source and make it available to the public (for instance on the Wiki) that would be great

Andrea_85 January 14, 2013 06:41

HI Bernhard,

if you can just copy here makeAxialMesh.C that compiles on OF 2.1.0 i can easily do the rest. I cannot find the source code.

Thanks

gschaider January 14, 2013 07:59

Quote:

Originally Posted by Andrea_85 (Post 401715)
HI Bernhard,

if you can just copy here makeAxialMesh.C that compiles on OF 2.1.0 i can easily do the rest. I cannot find the source code.

Thanks

Just added a tar to the MAM-page on the Wiki

Andrea_85 January 14, 2013 09:07

thank you very much!

best
andrea

shash June 7, 2013 07:07

problem with makeAxialMesh
 
2 Attachment(s)
hi bernhard,

I am new to openfoam and i am facing few problems with using makeAxialMesh for a simple case of laminar flow thru a 2D axisymmetric pipe, can you please point out the probleam in my case setup since i am getting boundary layer even at the axis(as in the attached fig.).

gschaider June 7, 2013 11:22

Quote:

Originally Posted by shash (Post 432633)
hi bernhard,

I am new to openfoam and i am facing few problems with using makeAxialMesh for a simple case of laminar flow thru a 2D axisymmetric pipe, can you please point out the probleam in my case setup since i am getting boundary layer even at the axis(as in the attached fig.).

Did you remove the patch with collapseEdges? And even if it is there: what are the boundary conditions on it?

ali jafari June 7, 2013 13:49

Quote:

Originally Posted by gschaider (Post 432670)
Did you remove the patch with collapseEdges? And even if it is there: what are the boundary conditions on it?

these are Cyclic . why collapseEdge ? can you explain , please

shash June 7, 2013 15:17

1 Attachment(s)
hi bernhard,

no i have not used collapseEdges, i simply gave these terminal commands
blockMesh
makeAxialMesh -axis center -wedge frontAndBack
icoFoam >& log

after running makeAxialMesh , a folder was formed from which i copied the polymesh dir. and replaced with the original.

my original blockMeshDict

convertToMeters 0.01;

vertices
(
(0 -1 0)
(5 -1 0)
(5 1 0)
(0 1 0)
(0 -1 2)
(5 -1 2)
(5 1 2)
(0 1 2)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (100 40 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}

outlet
{
type patch;
faces
(
(2 6 5 1)
);
}

fixedWalls
{
type wall;
faces
(
(3 7 6 2)
);
}

center
{
type empty;
faces
(
(1 5 4 0)
);
}

frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

and 0/u :

internalField uniform (0 0 0);

boundaryField
{
outlet
{
type zeroGradient;
}

inlet
{
type fixedValue;
value uniform (0.05 0 0);
}


fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}

center
{
type symmetryPlane;
}

frontAndBack
{
type empty;
}
frontAndBack_pos
{
type wedge;
}
frontAndBack_neg
{
type wedge;
}


I am also not very sure about the parameters in rotationDict (attached).

Will be grateful for ur help.

gschaider June 8, 2013 11:52

Quote:

Originally Posted by shash (Post 432696)
no i have not used collapseEdges,

You should have. That's why it is the last thing makeAxialMesh talks about it before it ends

shash June 17, 2013 06:35

hi bernhard,

I am sorry , i didn't go thru prevoius threads. Thanks a lot for ur answer now its up and running, I also wanted to confirm something, thou collapseEdges 1e-06 175 command after makeaxialmesh worked for me on OF ver 2.1 but a friend of mine is getting troubles running the same command collapseEdges 1e-06 175 for same case on OF ver 2.2, whats the reason for that, its showing required 0 argument, 2 given


All times are GMT -4. The time now is 21:44.