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)

sega April 12, 2010 08:40

Quote:

Originally Posted by Javed (Post 254300)
Thanks, but after correcting it i m getting following error

You can't use a wedge type on a non-wedge mesh.
Alter your points so they will form the wedge and than you can use the wedge type.

Javed April 12, 2010 08:57

Sir, I wil be grateful if u explain in details, how to form wedge from the given points?
Thanks

sega April 12, 2010 08:59

Quote:

Originally Posted by Javed (Post 254306)
Sir, I wil be grateful if u explain in details, how to form wedge from the given points?
Thanks

Have a look at the user guide.
http://www.openfoam.com/docs/user/bo...hp#x24-1370014

gschaider April 12, 2010 13:17

Quote:

Originally Posted by Javed (Post 254290)
Hi Bernhard,

I am trying to generate axisymmetric geom with the following blockMeshDict file:
convertToMeters 0.1;

<snip>

ill defined primitiveEntry starting at keyword 'patches' on line 41 and ending at line 70

file: /home/javed/OpenFOAM/javed-1.6/run/wedge/constant/polyMesh/blockMeshDict at line 70.

From function primitiveEntry::readEntry(const dictionary&, Istream&)
in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 210.

FOAM exiting


PLEASE HELP.

This is NOT a problem with the utility this thread is about. I won't answer further unrelated questions.

There is a '(' missing at "empty center". Use a text editor that displays matching Parenthesis (Emacs for instance) that helps to spot such problems

Javed April 13, 2010 03:59

Sir,,

I am sorry for disturbing u in another thread.
I didn't get anyother thread where i can put my query regarding axisymmetric geometry.
It will be great if u plz let help me for the following pbm..
I have developed the axisymmetric pbm with follwoing blockMesh file..
blocks
(
hex (0 1 2 3 0 1 6 7) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall fixed
(
(3 7 6 2)
)
patch inlet
(
(0 0 7 3)
)
patch outlet
(
(2 6 1 1)
)
empty center
(
(1 1 0 0)
)
wedge front
(
(0 3 2 1)
)
wedge back
(
(0 1 6 7)
)
);

but getting follwoing error..
Creating block mesh from
"/home/javed/OpenFOAM/javed-1.6/run/wedge-new/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
#0 Foam::error::printStack(Foam::Ostream&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::wedgePolyPatch::initTransforms() in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::wedgePolyPatch::wedgePolyPatch(Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam::polyPatch::addwordConstructorToTable<Foam::w edgePolyPatch>::New(Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#6 Foam::polyPatch::New(Foam::word const&, Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#7 Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/home/javed/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#8 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#9 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#10 main in "/home/javed/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/blockMesh"
#11 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#12 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122
Floating point exception
..

Thanks for the help...

sega April 13, 2010 05:21

Quote:

Originally Posted by Javed (Post 254403)
I didn't get anyother thread where i can put my query regarding axisymmetric geometry.

Open you own.
We have misused this thread.
Sorry

bengt April 29, 2010 02:21

checkMesh Error when using "axis offset"
 
Dear Foamers,
I'd like to resume this thread and come back to the checkMesh error "Failed 1 mesh checks" which had been previously reported with cases where the axis is not aligned with the patch (axis offset feature). For example:
----------
***Number of edges not aligned with or perpendicular to non-empty directions: 96154
<<Writing 74460 points on non-aligned edges to set nonAlignedEdges
----------
I've got the same problem with a concentric cylinder set-up where the inner cylinder rotates and the outer is fixed (Taylor-Couette system with fluid-filled ring gap).
Do we have to use the collapseEdges utility with such cases (in my case collapseEdges doesn't seem to do anything and the checkMesh issue persists), or can the mesh be used "as is" after using makeAxialMesh??
I'd greatly appreciate any help!
Have a nice day
Bengt

bruxellois4 July 14, 2010 11:55

3 Attachment(s)
I don't think that MakeAxialMesh works with openFOam 1.7.

I have to simulate a barrel of a gun, as you can see in screen shots (attachments), i have one cell thick in y i direction, but in my boundary file i don't see how to define a wedge, SO has an idea, help plzz
13
(
tube5
{
type wall;
nFaces 30;
startFace 60334;
}
tube4
{
type wall;
nFaces 3;
startFace 60364;
}
FREIN3
{
type wall;
nFaces 70;
startFace 60367;
}
FREIN2
{
type wall;
nFaces 15;
startFace 60437;
}
FREIN1
{
type wall;
nFaces 30;
startFace 60452;
}
Frein
{
type wall;
nFaces 20;
startFace 60482;
}
Pressure_inlet
{
type patch;
nFaces 30;
startFace 60502;
}
Tube3
{
type wall;
nFaces 21;
startFace 60532;
}
Tube2
{
type wall;
nFaces 10;
startFace 60553;
}
Tube1
{
type wall;
nFaces 139;
startFace 60563;
}
Axe
{
type symmetryPlane;
nFaces 215;
startFace 60702;
}
Pressure_outlet
{
type patch;
nFaces 209;
startFace 60917;
}
frontAndBackPlanes
{
type empty;
nFaces 60730;
startFace 61126;
}
)

bruxellois4 July 14, 2010 17:25

Greetings,

Help please, you can see my problem here (7th post)
http://www.cfd-online.com/Forums/ope...c-problem.html


Abdel.

bernarde July 29, 2010 09:00

Simulation results
 
Hi all

First of all thanks to Bernhard for the great utility.

Have have been using it a bit in order to get a 2D axisymmetrc simulation running. I started off with the example included in the utility, and modified it a bit. I added an outlet, and added a slight inflow into the domain. The model is based on this concept:

http://i1028.photobucket.com/albums/...edge_Assem.jpg


Flow enters the domain tangentially and exits axially. The flow is thus axisymmetric, and I'm just modelling a section of it.

I'm using the IcoFoam solver, and the solution converges well. However, the results don't look right. See below:

http://i1028.photobucket.com/albums/...et/wedge-1.jpg

It seems the flow is exiting the domain with almost no swirl. It also seems the inlet swirl is quickly dissipated. I'm quite sure this is not correct, since there is quite a lot of angular momentum introduced at the inlet, and this momentum must be conserved. I would expect the outlet flow to still have a lot of swirl.

Can anybody suggest any ideas?

gschaider August 3, 2010 09:53

Quote:

Originally Posted by bernarde (Post 269369)
Hi all

It seems the flow is exiting the domain with almost no swirl. It also seems the inlet swirl is quickly dissipated. I'm quite sure this is not correct, since there is quite a lot of angular momentum introduced at the inlet, and this momentum must be conserved. I would expect the outlet flow to still have a lot of swirl.

Can anybody suggest any ideas?

Have you checked whether what paraFoam shows you is consistent with what is on the disk. At least for older versions (havn't done wedges since) for glyphs the component "out of the wedge" was removed. What you had to do was use the "Cell Centers"-filter (then you saw nothing) and for that result use "Glyphs" (due to the small picture I'm not 100% sure whether there is a flow "out of the wedge" outside of the Inlet, so this might be not too helpful)

Bernhard

skarnani December 5, 2010 22:58

Hi Bengt,
I've run in to this same issue as well. I'm beginning to think that this is an accepted issue. If you look at the tutorial ~/OpenFOAM/sunny-1.6.x/run/tutorials/multiphase/interFoam/les/nozzleFlow2D which also uses an axisymmetric mesh, the same error shows up when you run checkMesh. Whether or not that makes it OK, I'm not sure, but at least it is clear that the provided tutorials have the same issue.

Sunny

mvoss December 10, 2010 09:22

hi,

is there a solution for the problem by which makeAxialMesh isnīt running if there are any libs or functions in the controlDict?

Regarding the groovyBC and the simpleFunctionObjects...

neewbie

gschaider December 14, 2010 04:44

Quote:

Originally Posted by neewbie (Post 286903)
hi,

is there a solution for the problem by which makeAxialMesh isnīt running if there are any libs or functions in the controlDict?

Regarding the groovyBC and the simpleFunctionObjects...

neewbie

The problem is that makeAxialMesh only loads the mesh as a polyMesh (it doesn't need more for what it has been doing) while most functionObjects need a fvMesh. The quickest solution is to go to the controlDict, comment out the functions and the libs entry, run MAM and then restore the controlDict to its old glory. Or if you have pyFoam installed run it like this

pyFoamRunner.py --remove-libs --remove-functions makeAxialMesh

which does the editing/restoring for you.

OR there is the possibility to turn of the functionObjects in the source code of the utility (but I'll have to look that up, maybe will do it, but you'll probably need a solution right now)

Bernhard

mvoss December 14, 2010 04:47

thanks,

this is exactly as i did.
Some mv and cp in a startscript did the job.

neewbie

mvoss January 4, 2011 11:37

btw...
can makeAxialMesh be used for multipleRegion meshes?

neewbie

mvoss January 5, 2011 03:02

sorry...
iīve started a new thread on this...

billynoe February 11, 2011 16:32

does this work for foam 1.7
 
I have been trying to make axisymmetric geometry the documentation says this utility is for V1.4 and 1.5. I am using V1.7. has anyone tried this in 1.7 before I put too much effort into altering my geometry.

louiza June 30, 2011 19:16

conversion 2Dmesh to axisymmetric
 
Hi everyone,

I imported my mesh (generate in fluent) file to a FOAM mesh successfully using fluentMeshToFoam command.

and I would Converting a 2Dmesh to axisymmetric, I downlowd the makeAxialMesh and it's compiling successfuly.
my question:What are the other commands to perform the conversion?
I found the answer in a forum on the link, but it's removed:)"Contrib MakeAxialMesh - OpenFOAMWiki"
I work OpenFoam 1.7.1 under UBUNTO
thank you for your help

gschaider July 1, 2011 00:32

Quote:

Originally Posted by louiza (Post 314321)
Hi everyone,

I imported my mesh (generate in fluent) file to a FOAM mesh successfully using fluentMeshToFoam command.

and I would Converting a 2Dmesh to axisymmetric, I downlowd the makeAxialMesh and it's compiling successfuly.
my question:What are the other commands to perform the conversion?
I found the answer in a forum on the link, but it's removed:)"Contrib MakeAxialMesh - OpenFOAMWiki"
I work OpenFoam 1.7.1 under UBUNTO
thank you for your help

What do you mean with "it's removed". Don't know the posing you're referring to, but checking with
http://lmgtfy.com/?q=openfoamwiki+makeaxialmesh&l=1
gives the right page

Bernhard


All times are GMT -4. The time now is 23:56.