CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Salome] Salome -> OpenFoam ( Export as unv) Problems encountered

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

Like Tree1Likes
  • 1 Post By wouter

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2011, 18:24
Default Salome -> OpenFoam ( Export as unv) Problems encountered
  #1
New Member
 
Thibault M
Join Date: Feb 2011
Location: Coventry , ENGLAND
Posts: 1
Rep Power: 0
tibo11 is on a distinguished road
Hi,
I am in Bsc of European Engineering
For my final year project , I use Salome and OpenFoam.

The problem is: the file BlockMeshDict ( in PolyMesh) is not created but all the others such as boundary,faces,neighbour,owner and point are created.
and I think that is why , I am not able to run ParaFoam

The geometry and the Mesh have been created with Salome.
I have deleted the Polymesh in the directory CONSTANT.
And I have used the terminal like that:

maillet@macbookThibault:~/OpenFOAM/Project/cavity$ ideasUnvToFoam /home/maillet/OpenFOAM/Project/GroupMesh_20.unv
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.x |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.x-3776603e4c6c
Exec : ideasUnvToFoam /home/maillet/OpenFOAM/Project/GroupMesh_20.unv
Date : Feb 07 2011
Time : 23:09:06
Host : macbookThibault
PID : 2796
Case : /home/maillet/OpenFOAM/Project/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Processing tag:2411
Starting reading points at line 3.
Read 12142 points.

Processing tag:2412
Starting reading cells at line 24290.
First occurrence of element type 11 for cell 1 at line 24291
First occurrence of element type 41 for cell 365 at line 25383
First occurrence of element type 111 for cell 10567 at line 45787
Read 55577 cells and 10202 boundary faces.

Processing tag:2467
Starting reading patches at line 156943.
For group 1 named Top trying to read 1785 patch face indices.
For group 2 named Wall trying to read 4548 patch face indices.
For group 3 named Bottom trying to read 1786 patch face indices.
For group 4 named Inlet trying to read 9 patch face indices.
For group 5 named Outlet trying to read 14 patch face indices.
For group 6 named Pipe trying to read 1684 patch face indices.
For group 7 named Ext_Pipe trying to read 376 patch face indices.

Sorting boundary faces according to group (patch)
Constructing mesh with non-default patches of size:
Top 1785
Wall 4548
Bottom 1786
Inlet 9
Outlet 14
Pipe 1684
Ext_Pipe 376

End

[COLOR="rgb(255, 140, 0)"] maillet@macbookThibault:~/OpenFOAM/Project/cavity$ blockMesh [/COLOR]
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.x |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.x-3776603e4c6c
Exec : blockMesh
Date : Feb 07 2011
Time : 23:10:00
Host : macbookThibault
PID : 2798
Case : /home/maillet/OpenFOAM/Project/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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



--> FOAM FATAL ERROR:
Cannot open mesh description file
"/home/maillet/OpenFOAM/Project/cavity/constant/polyMesh/blockMeshDict"


From function blockMesh
in file blockMeshApp.C at line 141.

FOAM exiting









So, If you know what is my mistake...and why the file blockMeshDict is not created
Thank you very much

Thibault
tibo11 is offline   Reply With Quote

Old   February 8, 2011, 05:16
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
Hi Thibault,

a blockMeshDict file is only needed, if you don't have a mesh written by a mesh generator (like Salome in your case). The blockMeshDict file is not written by a mesh generator.

With the blockMesh tool from OpenFOAM you can create very good meshes for geometries with a simple topology. In most of the OpenFOAM tutorial cases the blockMesh tool is used, because it doesn't take much disk space, the mesh quality is fine, the usage is easy...

In your case just export the mesh as you did, convert it the way you did, set up your case appropriately and run your simulation. There is no blockMesh command in the sequence.

Have fun

Martin
MartinB is offline   Reply With Quote

Old   January 8, 2013, 15:42
Default
  #3
New Member
 
vanesa fernandez
Join Date: Jan 2013
Posts: 7
Rep Power: 13
yasmil is on a distinguished road
Quote:
Originally Posted by MartinB View Post
Hi Thibault,

a blockMeshDict file is only needed, if you don't have a mesh written by a mesh generator (like Salome in your case). The blockMeshDict file is not written by a mesh generator.

With the blockMesh tool from OpenFOAM you can create very good meshes for geometries with a simple topology. In most of the OpenFOAM tutorial cases the blockMesh tool is used, because it doesn't take much disk space, the mesh quality is fine, the usage is easy...

In your case just export the mesh as you did, convert it the way you did, set up your case appropriately and run your simulation. There is no blockMesh command in the sequence.

Have fun

Martin
Hello,

I had a question regarding salome and the blockmeshdict file. As was suggested before, I dont think that the blockmeshdict file is necessary to solve the case.

I used salome to generate the mesh. The mesh was correctly created but there's no blockmeshdict file. Is it up to the user to create it after having generated the mesh?

If the user chooses not to create the blockmeshdict file, how can we postprocess the case? I would like to use Salome, since i'm familiar with it..are there any tutorials about how to export results from openfoam to salome?
yasmil is offline   Reply With Quote

Old   January 8, 2013, 17:13
Default
  #4
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello

As MartinB wrote: To run a case you do not need a blockMeshDict file. Only if you do not have a 'meshcreator' than you can use blockMesh to create a mesh. But Salome creates a mesh for you, so you do not need blockMesh and so you do not need blockMeshDict.
If you convert .unv to foam you do need to examine constant/polymesh/boundary to check if the boundaries are of the right type (eg type wall is not created you have to edit this yourself)

hope this clears things up
regards
Wouter
wouter is offline   Reply With Quote

Old   January 8, 2013, 17:43
Default postprocess with Salome?
  #5
New Member
 
vanesa fernandez
Join Date: Jan 2013
Posts: 7
Rep Power: 13
yasmil is on a distinguished road
Quote:
Originally Posted by wouter View Post
hello

As MartinB wrote: To run a case you do not need a blockMeshDict file. Only if you do not have a 'meshcreator' than you can use blockMesh to create a mesh. But Salome creates a mesh for you, so you do not need blockMesh and so you do not need blockMeshDict.
If you convert .unv to foam you do need to examine constant/polymesh/boundary to check if the boundaries are of the right type (eg type wall is not created you have to edit this yourself)

hope this clears things up
regards
Wouter
Thanks for your response Wouter but my question was more about the postprocessing part of the work:
once I've run the case and OpenFOAM has solved the problem, since I did not create a blockmeshdict file, how can I use paraFoam to postprocess the results?

My guess is that I can't do it since there's no blockMeshDict file, is this right? If I'm right, can I export the result files from OpenFOAM to Salome? I prefer to work with Salome...

Do you know of any tutorials?

or is it better to just write the blockMeshDict file and use paraFoam?
yasmil is offline   Reply With Quote

Old   January 8, 2013, 18:10
Default
  #6
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello,

For paraFoam the same applies, it does not need blockMeshDict, it can read the created files during the run. I use it often and I do not understand what problem you have

Best
Wouter
wouter is offline   Reply With Quote

Old   January 8, 2013, 18:26
Default blockmeshdict and parafoam
  #7
New Member
 
vanesa fernandez
Join Date: Jan 2013
Posts: 7
Rep Power: 13
yasmil is on a distinguished road
Hi wouter,

thanks for your time and responses. I am accostumed to using paraFoam after typing the blockMesh command on the terminal...in those cases I have the blockmeshdict file and paraFoam starts...

if I try do it for cases that do not have the blockMeshDict file, i get an error that says it's missing:
Cannot open mesh description file
"/home/gwen/OpenFOAM/gwen-2.1.1/run/tutorials/incompressible/icoFoam/case2heat/constant/polyMesh/blockMeshDict"

So I figured that I needed it for using paraFoam, if this is not the case, then could you please explain how I can see the mesh imported from Salome to paraFoam without it?

And once I solved the case, how can I postprocess the resultsusing paraFoam without it?

Best regards
yasmil is offline   Reply With Quote

Old   January 8, 2013, 18:49
Default
  #8
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello yasmil,

after you run ideasUnvToFoam you get all the files paraFoam need. you just type paraFoam. You then get a list with fields on the left where you must the first time remove all the selection because you did not change the boundary names yet(maybe) otherwise no problem. you say apply and you select surface or wireframe you can even select the boundary names and see them in paraFoam. It goes the same during and after the run. If you start paraFoam from a different terminal you can use update times so you can see the progress.

Best regards
Wouter


Alhasan likes this.
wouter is offline   Reply With Quote

Old   January 9, 2013, 06:39
Default
  #9
New Member
 
vanesa fernandez
Join Date: Jan 2013
Posts: 7
Rep Power: 13
yasmil is on a distinguished road
Ok, I finally got it, thank you wouter!
yasmil is offline   Reply With Quote

Old   April 29, 2019, 13:07
Default
  #10
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Hi everyone,


I have almost the similar problem. I have created one geometry and its mesh in Salome, and then I imported that in OpenFoam using "ideasUnvToFoam" utility.


Now, my case doesn't have blockMeshDict file in it because I created Mesh in Salome, But I need a blockMeshDict file because I need to create to cellSets for my geometry using topoSet.


Actually, my geometry consists of three regions (hot box, cold box and pipe) and I want to create a heat source on one face of hot box using fvOption file, and for that I need to generate a cellSet.



How can we create a blockMeshDict file in this case? OR Is there anyway to create topoSetDict file without blockMeshDict file?


I shall be very thankful for your help.


Thank you
Raza Javed is offline   Reply With Quote

Old   April 29, 2019, 17:14
Default
  #11
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
hello raza Javed,
I do not think you need a blockmeshDict to make a toposetdict, why do you think so?


hope this helps
Wouter
wouter is offline   Reply With Quote

Old   April 30, 2019, 03:07
Default
  #12
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Hi.


Thank you so much for your reply.


I think so because I found a sample code for "topoSetDict" which I think is useful for my case. The sample code is below:


Code:
source faceToCell;                       

sourceInfo                        

{                        

     set f0;             // Name of faceSet                       
     option neighbour; // cell with neighbour in faceSet                       

     option owner;     //  ,,       owner                       

     option any;         // cell with any face in faceSet                      

     option all;       // cell with all faces in faceSet                       

 }
From this sample code, it seems like I need to have faceSet to make cellSet. and I read on forum that I can define faceSet using blockMeshDict. Is there any way to define a faceSet without blockMeshDict?



OR


Can I directly write the name of the face I want to use. for example, "hotFace" in place of "f0" in the line below:



Code:
 set f0;             // Name of faceSet

Thank you
Raza Javed is offline   Reply With Quote

Old   April 30, 2019, 17:23
Default
  #13
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
from tutorials/incompressible/simpleFoam/pipeCyclic/topoSetDict:
Code:
 {
        name    f0;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name "side1";
        }
    }
here the sourceInfo let you use a name that you created in salome and you can see in the boundary file in polyMesh that is created with ideasUnvToFoam.


hope this helps
Wouter

wouter is offline   Reply With Quote

Old   May 1, 2019, 07:21
Default
  #14
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Thank you so much for your help.



Now I can use topoSet to make cellSet, and the log file of topoSet shows that it is generating the cellSet, as you can see below:


Code:
Reading topoSetDict

Time = 0
    mesh not changed.
Created faceSet hot
    Applying source patchToFace
    Adding all faces of patch hotFace ...
    Found matching patch hotFace with 253 faces.
    faceSet hot now size 253
Created cellSet hotcell
    Applying source faceToCell
    Adding cells according to faceSet hot ...
    cellSet hotcell now size 253
End
But I am getting the following error:
Code:
--> FOAM FATAL ERROR: 
Illegal content 8200 of set:hotcell of type cellSet
Value should be between 0 and 6396

    From function void Foam::topoSet::check(Foam::label)
    in file sets/topoSets/topoSet.C at line 189.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::topoSet::check(int) at ??:?
#3  Foam::cellSet::cellSet(Foam::polyMesh const&, Foam::word const&, Foam::IOobject::readOption, Foam::IOobject::writeOption) at ??:?
#4  Foam::fv::cellSetOption::setCellSet() at ??:?
#5  Foam::fv::cellSetOption::cellSetOption(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#6  Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::SemiImplicitSource<double> >::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#7  Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#8  Foam::fv::optionList::reset(Foam::dictionary const&) at ??:?
#9  Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:?
#10  Foam::fv::options::options(Foam::fvMesh const&) at ??:?
#11  ? at ??:?
#12  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13  ? at ??:?
Aborted (core dumped)
I don't know why I am getting this error? Am I doing mistake in writing topoSet file?



My topoSet file is given below:


Code:
actions
(
    {
        name    hot;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name "hotFace";
        }
    } 
// Select based on faceSet
    {
        name    hotcell;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set hot;             // Name of faceSet

       //option neighbour; // cell with neighbour in faceSet
        //option owner;     //  ,,       owner
        option any;         // cell with any face in faceSet
       //option all;       // cell with all faces in faceSet
        } 
    }
 );

I shall be very thankful if you can you please help me out in this?


Thank you
Raza Javed is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
[Salome] mesh conversion Salome --> OpenFoam vaina74 OpenFOAM Meshing & Mesh Conversion 42 March 4, 2022 20:41
[OpenFOAM.org] Compilation Error with OpenFOAM-5.x using Intel Compilers aow OpenFOAM Installation 4 April 25, 2019 16:17
[Salome] Step to export mesh from SALOME to OpenFoam for 3D MRF geometry aminem OpenFOAM Meshing & Mesh Conversion 0 September 16, 2014 10:18
OpenFOAM gcc configuration problem preacher OpenFOAM Installation 7 March 3, 2014 22:44


All times are GMT -4. The time now is 07:36.