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)

elorriaux February 23, 2009 12:18

Hi everyone, i think i've n
 
Hi everyone,

i think i've noticed an error in makeAxialMesh. Comparing a wedge realized with gmsh and another with makeAxialMesh, i've noticed that the wedge angle is 2.5°, not 5°.

Checking the code, i can see a scalar variable "angle" set to 2.5° in order to revolve -2.5° and +2.5°, but i also see a 0.5 factor in the "factor" variable.

I think that the factor should be set to 1.0 or the angle to 5°, am I wrong ?

Sincerely,

Etienne.

gschaider February 24, 2009 09:03

Hi! Etienne convinced me on
 
Hi!

Etienne convinced me on the IRC that he is right (and I am wrong). The mistake is now corrected in the 1.4.1-version on the SVN. In the 1.5 version it was already corrected

Bernhard

elorriaux February 24, 2009 14:25

Hi everyone ! I've found an
 
Hi everyone !

I've found another problem in makeAxialMesh ;) (sorry Bernhard to bother you ;)). This one is present in the 2 versions. But I think we have to discuss if we correct it or not.

In fact, makeAxialMesh does not revolve the mesh, it projects the mesh on wedge planes. I agree that the error is really small (depending on the radius of the problem), but it caused me great problems for coincidence with another mesh.

I've added 2 lines and modified one to solve the problem in 1.4.1, the same modif can be applied in the 1.5 version.

The question is : "should we consider this point as a modelization problem ?"

Regards, Etienne.

elorriaux March 2, 2009 15:33

Hello, I've modified the co
 
Hello,

I've modified the code and added a revolve option. This change should be transparent for users who don't want this feature. The 2 versions 1.4.1 and 1.5 have been updated.

To activate it, add '-revolve' to the command line or change it in the dictionary if you use the rotationDict.

Check the output when running makeAxialMesh, you'll see 'Revolving nodes' or 'Projecting nodes'

Etienne.

egp March 13, 2009 07:24

Just tried to compile makeAxia
 
Just tried to compile makeAxialMesh on 1.5-dev. It is looking for repatchPolyTopoChanger.H, which was removed in 1.5-dev (I can't find it in src/dynamicMesh). Given that makeAxialMesh is distributed through the OpenFOAM-extend repository, I figured it would have been tested and fixed for the -dev versions. Anyone have a solution?

Eric

elorriaux March 13, 2009 07:46

Hello Eric, you're right, m
 
Hello Eric,

you're right, makeAxialMesh does not compile with 1.5-dev because of slight divergences between the official release and the svn release.

I've searched quickly but I've not found a way to solve this problem easily.

Sincerely, Etienne.

gschaider March 16, 2009 08:29

Quote:

Originally Posted by egp (Post 186415)
Just tried to compile makeAxialMesh on 1.5-dev. It is looking for repatchPolyTopoChanger.H, which was removed in 1.5-dev (I can't find it in src/dynamicMesh). Given that makeAxialMesh is distributed through the OpenFOAM-extend repository, I figured it would have been tested and fixed for the -dev versions. Anyone have a solution?

Eric

The part of the extend outside of the dev-tree tries to be "version-agnostic". I havn't used makeAxialMesh for a long time and never with the dev. I'll have a look what a few #ifdefs can do to fix this

Bernhard

prjohnston April 29, 2009 01:28

makeAxialMake and collapseEdges
 
Dear Bernhard,

I was able to download and compile the version of makeAxialMesh for OpenFOAM v1.5. It seems to run OK, but I am having trouble running the test case axialCavity. I think the problem is that I am unsure how to use the routines.

Firstly, I run blockMesh, then I run the command

makeAxialMesh -axis fixedWalls -wedge frontAndBack

This seems to give no errors, but writes the mesh to time 0.00125 (why?). In the same directory I run the command

collapseEdges 0.0001 175

(small length and large angle as suggested in the wiki) no small edges are collapsed, but this is looking in the time=0 directory. The new mesh is in the time=0.00125 directory. However, when I force collapseEdges to look at the time=0.00125 directory, I get 21 collapsed small edges, the results of which are written in the time=0.0025 directory (again why?).

Is the idea to copy the keep copying the files generated by makeAxialMesh and collapseEdges back into constant/polyMesh?

Thanks,

Peter

gschaider April 29, 2009 15:00

Quote:

Originally Posted by prjohnston (Post 214557)
Dear Bernhard,

I was able to download and compile the version of makeAxialMesh for OpenFOAM v1.5. It seems to run OK, but I am having trouble running the test case axialCavity. I think the problem is that I am unsure how to use the routines.

Firstly, I run blockMesh, then I run the command

makeAxialMesh -axis fixedWalls -wedge frontAndBack

This seems to give no errors, but writes the mesh to time 0.00125 (why?).

@why: this is a convention enforced by most mesh-utilities to protect you from accidentally overwriting the mesh in constant/polyMesh. Just set in the controlDict the startFrom to latestTime, do your things and in the end copy the mesh from the latest time-step to constant (and remove all other meshes). In other words: think of it as an undo-function for mesh-manipulation.

If you can do without undo: most mesh utilities have an option -overwrite ....

Quote:

Originally Posted by prjohnston (Post 214557)
In the same directory I run the command

collapseEdges 0.0001 175

(small length and large angle as suggested in the wiki) no small edges are collapsed, but this is looking in the time=0 directory. The new mesh is in the time=0.00125 directory. However, when I force collapseEdges to look at the time=0.00125 directory, I get 21 collapsed small edges, the results of which are written in the time=0.0025 directory (again why?).

Is the idea to copy the keep copying the files generated by makeAxialMesh and collapseEdges back into constant/polyMesh?

Yep. See above

Bernhard

mihir1310 May 15, 2009 15:15

Quote:

Originally Posted by egp (Post 186415)
Just tried to compile makeAxialMesh on 1.5-dev. It is looking for repatchPolyTopoChanger.H, which was removed in 1.5-dev (I can't find it in src/dynamicMesh). Given that makeAxialMesh is distributed through the OpenFOAM-extend repository, I figured it would have been tested and fixed for the -dev versions. Anyone have a solution?

Eric

Quote:

Originally Posted by elorriaux (Post 186416)
Hello Eric,

you're right, makeAxialMesh does not compile with 1.5-dev because of slight divergences between the official release and the svn release.

I've searched quickly but I've not found a way to solve this problem easily.

Sincerely, Etienne.

Quote:

Originally Posted by prjohnston (Post 214557)
Dear Bernhard,

I was able to download and compile the version of makeAxialMesh for OpenFOAM v1.5. It seems to run OK, but I am having trouble running the test case axialCavity. I think the problem is that I am unsure how to use the routines.


Thanks,

Peter

Hey , how did you compile makeaxialmesh in 1.5 ??? I encountered the same problem as Eric & Etienne . Did you find a way out ??

prjohnston May 17, 2009 23:00

I simply used the standard v1.5 and not v1.5-dev. I did not need to do anything special. However, I guess that is not much use to you. Sorry.

Regards,

Peter.

gschaider May 19, 2009 18:52

Quote:

Originally Posted by mihir1310 (Post 216304)
Hey , how did you compile makeaxialmesh in 1.5 ??? I encountered the same problem as Eric & Etienne . Did you find a way out ??

Which version of the sources are you using. I tried the last one from the SVN and successfully compiled them with 1.5.x and 1.5-dev (the dev has to be younger than approx 2 mths)

Bernhard

mihir1310 May 20, 2009 14:52

[/QUOTE]

Quote:

Originally Posted by gschaider (Post 216649)
Which version of the sources are you using. I tried the last one from the SVN and successfully compiled them with 1.5.x and 1.5-dev (the dev has to be younger than approx 2 mths)

Bernhard


All right , i i used the latest from the SVN . It compiled successfullyy . But what is the command . If the use the command: makeAxialMesh . . axis frontAndBackPlanes as in 1.4 , it doesnt not work .. What are the arguments that have to be specified ?

schmidt_d May 20, 2009 17:10

Mihir,

Take a look in cd $WM_PROJECT_USER_DIR/applications/MakeAxialMesh for the TestCases directory. Look at how the parameters are now passed to makeAxialMesh through the rotation dictionary:
system/rotationDict

lions85 August 30, 2009 14:33

Hi,
I hope this is the right post.
I'm trying to use makeaxialmesh but I found some difficulties.
I have this 2d mesh (1 cell thick) converted from a 2d fluent mesh using fluentofoam, with the axis edge named axis and the opposite edge (the one that has to be splitted in two edges) named wall.
In the terminal I went into the folder of the case and I gave this command:
makeAxialMesh axis wall
and I get this error:
Create time

Create mesh for time = 0

#0 Foam::error::printStack(Foam::Ostream&) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) in "/home/lions85/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libstdc++.so.6"
#4 main in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
#5 __libc_start_main in "/lib/libc.so.6"
#6 _start in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
Segmentation fault


Probably I'm making a mistake, but I can not find it simply.
Is someone able to help me?
Thank you very much
EManuele

mihir1310 August 30, 2009 14:47

Quote:

Originally Posted by lions85 (Post 227942)
Hi,
I hope this is the right post.
I'm trying to use makeaxialmesh but I found some difficulties.
I have this 2d mesh (1 cell thick) converted from a 2d fluent mesh using fluentofoam, with the axis edge named axis and the opposite edge (the one that has to be splitted in two edges) named wall.
In the terminal I went into the folder of the case and I gave this command:
makeAxialMesh axis wall
and I get this error:



Probably I'm making a mistake, but I can not find it simply.
Is someone able to help me?
Thank you very much
EManuele

Well Id name it frontAndBackPlanes

makeAxialMesh axis frontAndBackPlanes

lions85 August 30, 2009 16:30

Sorry,
may you explain it better?? I didn't understand very well.
Anyway i tried with the command

makeAxialMesh axis frontAndBackPlanes

and i got

Create time

Create mesh for time = 0

#0 Foam::error::printStack(Foam::Ostream&) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) in "/home/lions85/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libstdc++.so.6"
#4 main in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
#5 __libc_start_main in "/lib/libc.so.6"
#6 _start in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
Segmentation fault

Thank you
Emanuele

P.S. consider that i have my boundary edges that I created with gambit and then I have two other boundaries created during the conversion from fluent to foam and one of this is named automatically FrontAndBackPlanes

mihir1310 August 30, 2009 17:16

Quote:

Originally Posted by lions85 (Post 227947)
Sorry,
may you explain it better?? I didn't understand very well.
Anyway i tried with the command

makeAxialMesh axis frontAndBackPlanes

and i got

Create time

Create mesh for time = 0

#0 Foam::error::printStack(Foam::Ostream&) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/lions85/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) in "/home/lions85/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libstdc++.so.6"
#4 main in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
#5 __libc_start_main in "/lib/libc.so.6"
#6 _start in "/home/lions85/OpenFOAM/lions85-1.5/applications/bin/linux64GccDPOpt/makeAxialMesh"
Segmentation fault

Thank you
Emanuele

P.S. consider that i have my boundary edges that I created with gambit and then I have two other boundaries created during the conversion from fluent to foam and one of this is named automatically FrontAndBackPlanes

this is a 'segmentation violation (sigSegv)' problem caused by faulty memory allocation problem . I dont know how to deal with it compleely , but you can read this for more info http://openfoamwiki.net/index.php/HowTo_debugging

gschaider August 31, 2009 14:32

Quote:

Originally Posted by mihir1310 (Post 227950)
this is a 'segmentation violation (sigSegv)' problem caused by faulty memory allocation problem . I dont know how to deal with it compleely , but you can read this for more info http://openfoamwiki.net/index.php/HowTo_debugging

I don't remember exactly where, but I've seen that error somewhere. The strange thing is that your stack-trace indicates the string-classes. Have you got an entry libs and or functionObjects in you controlDict. If yes: disable it. (But there's only a 20% chance that this is the problem)

The other thing: is there any other application that you successfully compiled before? Is your version of OF a downloaded binary or self-compiled? Because I remotely remember having seen a similar stack-trace in a previous discussion and it was a compilation problem or something like that

Bernhard

yuhai October 27, 2009 12:45

Hi, dear all,
I tried to revolve (select withMesh option)my face in Gambit, and I can only get a volumn, but the mesh is not created in the volumn.
Does anybody know the answer?


sorry, I am away from the topic.


All times are GMT -4. The time now is 20:41.