CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

Converting a 2Dmesh to axisymmetric

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 20, 2005, 15:57
Default I just wrote a utility that ta
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
I just wrote a utility that takes a regular 2D-mesh (a mesh that is one cell thick) and converts it into a axi-symmetric mesh (as described in the UserGuide 6.2.2) by collapsing one (user-specified) boundary patch and adjusting the cordinates of the vertices.

If it is of general interest, I'd be happy to share it.
supersoldier likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 20, 2005, 20:15
Default Hi, Bernhard, I am interest
  #2
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9
hsieh is on a distinguished road
Hi, Bernhard,

I am interested in this utility. Could you please email to me? Is the input using true 2D mesh (like shell element) or it takes a 3D mesh but, with only one cell thick in the Z direction? Thanks!

Pei
Peiying2003@yahoo.com
hsieh is offline   Reply With Quote

Old   April 21, 2005, 03:05
Default Hi, I am also interested! C
  #3
New Member
 
Nils Ellendt
Join Date: Mar 2009
Posts: 2
Rep Power: 0
nils is on a distinguished road
Hi,

I am also interested! Could you please also email it to me? Thanks a lot!


Nils :-)
nils is offline   Reply With Quote

Old   April 21, 2005, 03:51
Default Yes, the utilities uses a Open
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Yes, the utilities uses a OpenFOAM-2D-mesh: a 3D-mesh that is one cell thick. Don't know if OF can handle true 2D-grids (I don't think so)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 17, 2006, 09:26
Default Hello Bernhard, I am starting
  #5
New Member
 
Thomas Groensfelder
Join Date: Mar 2009
Posts: 6
Rep Power: 8
groens is on a distinguished road
Hello Bernhard,
I am starting to do some work with FOAM.
I would be interested in your tool, too.

Thanks in Advance.
Thomas
groens is offline   Reply With Quote

Old   January 17, 2006, 11:01
Default Hello Thomas! The utility c
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hello Thomas!

The utility can be found at:

http://openfoamwiki.net/index.php/Contrib_MakeAxi alMesh

Let me know if it works for you (Judging from the date it was developed on 1.1, maybe something has to be changed in Make/options to get it to compile on 1.2)
apple-tree and skyinventorbt like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 1, 2008, 12:08
Default Hey All, Im a mac user, for
  #7
New Member
 
Michael Munroe
Join Date: Mar 2009
Location: tempe, arizona, usa
Posts: 1
Rep Power: 0
engrstudentgmailcom is on a distinguished road
Hey All,

Im a mac user, formerly a windows user, and I am not a linux programmer.

Im trying to work through a basic cfd tutorial for fluent, except in OpenFOAM.
http://courses.cit.cornell.edu/fluent/pipe1/index.htm

I made the mesh in gambit, and exported to fluent.
I found the utility to import the fluent mesh into OpenFOAM. Now I discover that one problem is that the new mesh isn't axisymmetric. I need to find a way to do that. (Im using CAELinux with its installation of OpenFOAM.)

I dont know how to compile with makefiles. A majority of my programming experience is MatLab.

How do i make the makeAxialMesh go from a .tgz to a working program in CAE Linux - Foam?

Thanks,
Mike Munroe
engrstudentgmailcom is offline   Reply With Quote

Old   February 4, 2008, 09:36
Default Hi Michael! Just untar the
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Michael!

Just untar the sources (the tgz is nothing but a zip-file for men). Propable you can do that from the GUI of your Linux-distro. Then go to the resulting directory and do as described in section 3.2 of the OF-Userguide (Compilation of applications). No programming should be required.

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 19, 2008, 19:08
Default Hi all, I have a problem whe
  #9
New Member
 
Simone.Sa
Join Date: Mar 2009
Location: Rome, Italy
Posts: 9
Rep Power: 8
bonzodeb is on a distinguished road
Hi all,
I have a problem when I try to compile MakeAxialMesh .
I have:
1) In $HOME untar the file MakeAxialMesh1.4.1.tgz
2) cd ./makeAxialMesh
3)wmake

This is the output

SOURCE=makeAxialMesh.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/dynamicMesh/lnInclude -I/home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/cfdTools/lnInclude -I/home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -IlnInclude -I. -I/home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/makeAxialMesh.o
In file included from /home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/i686-pc-linux-gnu/bits/c++config.h:41,
from /home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/string:45,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/string.H:47,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/stringList.H:36,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/argList.H:36,
from makeAxialMesh.C:46:
/home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/i686-pc-linux-gnu/bits/os_defines.h:44:22: error: features.h: No such file or directory
In file included from /home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/bits/char_traits.h:45,
from /home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/string:47,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/string.H:47,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/stringList.H:36,
from /home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/argList.H:36,
from makeAxialMesh.C:46:
/home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/cstring:52:20: error: string.h: No such file or directory
In file included from
...
(very long list of similar error messages)
...

/home/openflu/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/argList.H:36,
from makeAxialMesh.C:46:
/home/openflu/OpenFOAM/linux/gcc-4.2.1/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/.. /../../../include/c++/4.2.1/i686-pc-linux-gnu/bits/gthr.h:122: error: expected declaration before end of line
make: *** [Make/linuxGccDPOpt/makeAxialMesh.o] Error 1

I can't understand where I went wrong...
What's wrong??

Simone
bonzodeb is offline   Reply With Quote

Old   April 21, 2008, 06:27
Default I try also with the command s
  #10
New Member
 
Simone.Sa
Join Date: Mar 2009
Location: Rome, Italy
Posts: 9
Rep Power: 8
bonzodeb is on a distinguished road
I try also with the command
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breede r/utilities/mesh/manipulation/MakeAxialMesh

but there is the same error.
It says "not such file or directory", but the file is there...


Solutions??

I try to write the file blockMeshDict by hand:
I want to simulate a pipe r=0.5 m
This is my blockMeshDict file:
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


convertToMeters 1;

vertices
(
( 0 0 0 ) // vertex 0
( 0 0.5 0 ) // vertex 1
( 0.04358 0.4981 0 ) // vertex 2
( 0 0 100 ) // vertex 3
( 0 0.5 100 ) // vertex 4
( 0.04358 0.4981 100 ) // vertex 5
);

blocks
(
hex (0 2 1 0 3 5 4 3) (1 10 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(0 1 2 0 )
)

patch outlet
(
(3 5 4 3 )
)

patch wall
(
(1 4 5 2 )
)

wedge a
(
(4 1 0 3)
)

wedge b
(
( 0 2 5 3 )
)

empty collapsed
(
( 0 0 3 3 )
)
);

mergePatchPairs
(
);


// ************************************************** ***********************

This is the error
Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
#0 Foam::error::printStack(Foam:stream&) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb7f61420]
#3 Foam::wedgePolyPatch::initTransforms() in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::wedgePolyPatch::wedgePolyPatch(Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam::polyPatch::addwordConstructorToTable<foam::w edgepolypatch>::New(Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#6 Foam::polyPatch::New(Foam::word const&, Foam::word const&, int, int, int, Foam::polyBoundaryMesh const&) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#7 Foam::polyMesh::polyMesh(Foam::IOobject const&, 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::List<foam::word> const&, bool) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#8 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/blockMesh"
#9 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/blockMesh"
#10 main in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/blockMesh"
#11 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#12 Foam::regIOobject::readIfModified() in "/home/openflu/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/blockMesh"
Floating point exception


Can somebody help me??

Simone
bonzodeb is offline   Reply With Quote

Old   April 21, 2008, 06:56
Default Hi Simone! Concerning your
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Simone!

Concerning your compilation problem from the 19th. Seems like some system headers are missing. I assume that
a) you're using the gcc that comes with OpenFOAM (and there is no other gcc installed)
b) you never compiled any applications on your machine before (otherwise the error would have happened there too)
The easiers way to get the necessary headers is by installing the vendor-gcc, which will pull in all the necessary dependencies (glibc-headers etc) (OF will keep on using the OF-gcc, but at least the headers will be there)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 21, 2008, 10:22
Default You are right! I have been so
  #12
New Member
 
Simone.Sa
Join Date: Mar 2009
Location: Rome, Italy
Posts: 9
Rep Power: 8
bonzodeb is on a distinguished road
You are right!
I have been solved:

$ aptitude install build-essential gcc

Thanks Bernhard.

Simone
bonzodeb is offline   Reply With Quote

Old   January 13, 2009, 06:03
Default hi everyone, I am the getting
  #13
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 8
mahendra is on a distinguished road
hi everyone,
I am the getting the following error ,plz help me solve the problem.

Exec : makeAxialMesh Shaft_wall frontAndBackPlanes
Date : Jan 13 2009
Time : 15:43:00
Host : linux
PID : 10815
Case : /home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/mrj/channel
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

#0 Foam::error::printStack(Foam:stream&) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/lib OpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenF OAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 std::basic_string<char,>, std::allocator<char> >::basic_string(std::string const&) in "/home/ms.wankhede/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libstdc ++.so.6"
#4 main in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/mak eAxialMesh"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 __gxx_personality_v0 in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/mak eAx ialMesh"
Segmentation fault
mahendra is offline   Reply With Quote

Old   January 13, 2009, 07:57
Default Hi Mahend! Can't tell much
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahend!

Can't tell much from that error message. The strange thing is that it seems to happen during some string-handling operation. Have you got a Debug-enabled OF-version (see http://openfoamwiki.net/index.php/Main_FAQ#An_application_ends_with_a_segmentati on_fault._What_is_wrong.3F and the links going from it)? Could you provide us with a stack-trace from that one? Or the case?

Bernhard

PS: other question: do other applications that YOU compiled work? Have you recently updated your OF-installation?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 13, 2009, 08:57
Default Hello Bernhard... Yes I hav
  #15
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 8
mahendra is on a distinguished road
Hello Bernhard...

Yes I have compiled the "ComputeTorque", "calcMassFlow" utilities and they work fine. Even the "makeAxialMesh" utility was compiled without any errors.

And I have not updated the OpenFOAM-1.5 to higher version, I am still using OpenFOAM-1.5.

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 13, 2009, 18:36
Default Hi Mahendra! makeAxialMesh
  #16
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahendra!

makeAxialMesh never touches the pressure-field (I hope). I'd need the mesh. At least the boundary file

On a second thought: the call you posted looks a bit strange to me (maybe the docu on the Wiki is a bit out of date): try
makeAxialMesh -axis Bottom_wall -wedge frontAndBackPlanes

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 14, 2009, 00:51
Default Dear Bernhard hello, This i
  #17
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 8
mahendra is on a distinguished road
Dear Bernhard hello,

This is what I am getting after using makeAxialMesh -axis Bottom_wall -wedge frontAndBackPlanes

lcfd@clust5:~/OpenFOAM/lcfd-1.5/Mahendra/Pipe> makeAxialMesh -axis Bottom_wall -wedge frontAndBackPlanes
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Usage: makeAxialMesh <axis> <wedge> [-case dir] [-parallel] [-help] [-doc] [-srcDoc]


Invalid option: -axis
Invalid option: -wedge


FOAM exiting


I think the makeAxialMesh i have downloaded is for OpenFOAM-1.4.1 and I am using OpenFOAM-1.5. Is here the catch??

Regards,
Mahendra.
mahendra is offline   Reply With Quote

Old   January 14, 2009, 02:37
Default Dear Bernhard Hello ! I jus
  #18
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 8
mahendra is on a distinguished road
Dear Bernhard Hello !

I just went through the User Guide of OpenFOAM-1.5 and found the thing regarding importing a 2D fluent Mesh to OpenFOAM-1.5 and converting it into axi-symmetric mesh. It says that "Creation of axi-symmetric mesh is currently not supported"

I just wanted to know is really the conversion not available in OpenFOAM-1.5?

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   January 14, 2009, 06:18
Default Hi Mahendra! @1.5: Definitl
  #19
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mahendra!

@1.5: Definitly. Get the newest version (as described on the Wiki-page) before trying anything else. That one has the new Syntax.
@fluentMeshToFoam: That was never supported (meshes that were defined in Fluent as axisymetric). That is why makeAxialMesh got written in the first place

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 14, 2009, 06:36
Default Dear Bernhard... I am unabl
  #20
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 8
mahendra is on a distinguished road
Dear Bernhard...

I am unable to download the makeAxialMesh utility for OpenFOAM-1.5 from svn, Can you please help me how to download the utility?

Regards,
Mahendra
mahendra is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting RANS solver into LES Chiara Main CFD Forum 5 February 19, 2009 10:36
converting user-coding in V4 Karl Mehler CD-adapco 0 September 28, 2008 15:48
Converting objects shuo OpenFOAM 1 November 6, 2006 17:51
Converting 2D mesh to 3D Farooq FLUENT 1 August 7, 2003 05:03
Converting from tecplot to gmv format Charles Crosby Main CFD Forum 0 May 7, 2003 15:02


All times are GMT -4. The time now is 12:28.