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/)
-   -   [Salome] Salome 321 and UNV (https://www.cfd-online.com/Forums/openfoam-meshing/61975-salome-321-unv.html)

micpage18 August 23, 2006 20:03

Salome 321 and UNV
 
Hi, the new version of Salome can export mesh in UNV format and keep group defined. I want to know if this format can be converted to OpenFoam and what is the procedure.

Thanks

Michael Page

mattijs August 24, 2006 12:21

Does anyone know which port of
 
Does anyone know which port of Salome runs on a Suse10.1 distro? Having problems with OmniOrb and name servers and such (it's even worse than FoamX ;-)

santos August 27, 2006 20:52

Hello Mattijs I have instal
 
Hello Mattijs

I have installed the version for RedHat 8.0 on OpenSuse 10.1 and it works perfectly. In order to avoid problems, I suggest you to choose the binary option for every component during the instalation procedure. Make sure you source salome.sh (that is located in ..../salome/KERNEL_3.2.1) prior to running ...../KERNEL_3.2.1/bin/salome/runSalome.

I also have the same problem as Michael Page, I dont know how to convert UNV format to OpenFOAM format.

Best regards
José Santos

billy August 28, 2006 12:40

Hi, I think you need to bui
 
Hi,

I think you need to build a converter for that. From what I recall ideasToFoam translates a ansys format built using Ideas or something like that, which I found strange. I think ideasToFoam should read the unv file not an ansys type file.

billy August 28, 2006 12:51

Hi Jose, You installed all
 
Hi Jose,

You installed all that software listed in Salome's "Hardware and Software Requirements" or does it all come with the (492 Mb) download? It seems so much work. Is it worth it?

Billy.

micpage18 August 28, 2006 18:00

Hi Mattijs, Also, you can i
 
Hi Mattijs,

Also, you can install CAE Linux who contain a operating system (Pc linux) with a lot of engineering's program pre-installed (OpenFoam, Salome, Code-Aster and many other). Personnally, I work with CAE Linux because I don't know very well Linux, and time is money.

MP

ziad August 28, 2006 20:58

Actually each one of the these
 
Actually each one of the these codes is installable on Suse10 and ubuntu BB/DD. As for Salome, just installed it on OpenSuse 10.1 with gcc 4.1.0 (it works) native tcl/tk and all the binary trimmings (no sources) using the default config file config.xml. the salome.sh file can be sourced from .bashrc (or .tcshrc)

santos August 30, 2006 11:12

Hello Billy It all came wit
 
Hello Billy

It all came with the 492 MB download, and actually it was really easy to install. Give it a try. Hopefully you can figure out a way to convert the UNV file to OpenFOAM format ;-)

Regards
José Santos

billy August 30, 2006 15:24

Hi, I have just downloaded
 
Hi,

I have just downloaded caelinux and it seems very good. After, I will try to do a simulation using SALOME and OpenFOAM. I believe Salome can import IGES and STEP files, right?

Billy.

micpage18 August 31, 2006 06:55

Hi Billy, You're right, Sal
 
Hi Billy,

You're right, Salome can import IGES and STEP files. These format can be created by the majority of CAO software like SolidWorks and ProE.

But, I didn't succeed to make a simulation on OpenFoam with a mesh created with Salome because UNV format is not again supported by OpenFoam. So, if you find a way to use it, please post it on this forum.

MP

olesen August 31, 2006 08:33

If any of the Salmome users ha
 
If any of the Salmome users have information about the UNV format (especially how it is exported by Salome), fitting it into a format that Foam can import easily should be possible.

/mark

micpage18 August 31, 2006 11:28

UNV file writed by Salome are
 
UNV file writed by Salome are in normal text. So, if you click on it, you can read the mesh. Also, the structure of the file seem easy to understand. I don't know very well mesh format, but I think that node is in first, element after and at the end of the file there are groups. With some experiment, the structure of the file can ben found.

MP

mattijs August 31, 2006 12:22

I can install ok Salome but wh
 
I can install ok Salome but when I run it something goes wrong with the name server: "omni_thread_fatal". This is on a 64bit Suse10.1. Anyone else running 64bit without problems? Can you post/send your runSalome output?


Searching for a free port for naming service: 2810 - Ok
Configure parser: processing /home/hunt2/mattijs/salome_3.2.1/GUI_3.2.1/share/salome/resources/gui/SalomeApp. xml ...
Configure parser: Warning : could not find configuration file /home/hunt2/mattijs/salome_3.2.1/GUI_3.2.1/share/salome/resources/SalomeApp.xml
Configure parser: Warning : could not find user configuration file
GEOM OCAF Resources
GEOM Shape Healing Resources
startSalome {u'portkill': 0, u'file': 0, u'embedded': [u'SalomeAppEngine', u'study', u'cppContainer', u'registry', u'moduleCatalog'], u'killall': 0, 'appname': 'SalomeApp', u'modules': [u'GEOM', u'SMESH', u'VISU', u'SUPERV', u'MED', u'COMPONENT', u'PYCALCULATOR'], u'gui': 1, u'xterm': 0, u'interp': 0, u'pyModules': u'', 'port': 2810, u'splash': 1, u'SMESH_plugins': [u'NETGENPlugin', u'GHS3DPlugin'], u'key': [u'no'], 'plugins': [], 'containers': [], u'logger': 0, u'noexcepthandler': 0, u'standalone': [u'pyContainer', u'supervContainer', 'superv']}
Lancement du Naming Service runNS.sh > /tmp/logs/mattijs/salomeNS.log 2>&1
Searching Naming Service + found in 0.1 seconds
Notify Server to launch
command = ['notifd', '-c', '/home/hunt2/mattijs/salome_3.2.1/KERNEL_3.2.1/share/salome/resources/kernel/cha nnel.cfg', '-DFactoryIORFileName=/tmp/mattijs_rdifact.ior', '-DChannelIORFileName=/tmp/mattijs_rdichan.ior', '-DReportLogFile=/tmp/mattijs_notifd.report', '-DDebugLogFile=/tmp/mattijs_notifd.debug']
command = ['SALOME_Session_Server', '--with', 'Registry', '(', '--salome_session', 'theSession', ')', '--with', 'ModuleCatalog', '(', '-common', u'/home/hunt2/mattijs/salome_3.2.1/KERNEL_3.2.1/share/salome/resources/kernel/KE RNELCatalog.xml:/home/hunt2/mattijs/salome_3.2.1/GEOM_3.2.1/share/salome/resourc es/geom/GEOMCatalog.xml:/home/hunt2/mattijs/salome_3.2.1/SMESH_3.2.1/share/salom e/resources/smesh/SMESHCatalog.xml:/home/hunt2/mattijs/salome_3.2.1/VISU_3.2.1/s hare/salome/resources/visu/VISUCatalog.xml:/home/hunt2/mattijs/salome_3.2.1/SUPE RV_3.2.1/share/salome/resources/superv/SUPERVCatalog.xml:/home/hunt2/mattijs/sal ome_3.2.1/MED_3.2.1/share/salome/resources/med/MEDCatalog.xml:/home/hunt2/mattij s/salome_3.2.1/COMPONENT_3.2.1/share/salome/resources/component/COMPONENTCatalog .xml:/home/hunt2/mattijs/salome_3.2.1/PYCALCULATOR_3.2.1/share/salome/resources/ pycalculator/PYCALCULATORCatalog.xml', '-personal', '/home/hunt2/mattijs/Salome/resources/CatalogModulePersonnel.xml', ')', '--with', 'SALOMEDS', '(', ')', '--with', 'Container', '(', 'FactoryServer', ')', '--with', 'SalomeAppEngine', '(', ')', 'CPP', 'PY', 'SUPERV', 'GUI', 'SPLASH', '--modules (', u'GEOM:', u'SMESH:', u'VISU:', u'SUPERV:', u'MED:', u'COMPONENT:', u'PYCALCULATOR:', ')']
command = ['SALOME_ContainerManagerServer', '--with', 'Registry', '(', '--salome_session', 'theSession', ')', '--with', 'ModuleCatalog', '(', '-common', '', '-personal', '${HOME}/Salome/resources/CatalogModulePersonnel.xml', ')', '--with', 'SALOMEDS', '(', ')', '--with', 'Container', '(', 'FactoryServer', ')']
command = ['SALOME_ContainerPy.py', 'FactoryServerPy']
Searching /Containers/hunt/FactoryServerPy in Naming Service +terminate called after throwing an instance of 'omni_thread_fatal'
th. 3745225072 COMPILED with /dn22/SALOME/series3x/KERNEL/Mandrake/KERNEL_SRC/src/Container/SALOME_ContainerM anagerServer.cxx [31] : g++, Jul 19 2006 at 19:40:11

billy August 31, 2006 13:54

I think ideasToFoam should be
 
I think ideasToFoam should be called ansysToFoam and ideasToFoam should read unv format. I think this has confused people because they are trying to convert unv with ideasToFoam and it is not possible.

This is what I know of unv data file:

unv is tricky because there is no count of the nodes and elements at the beggining of the file. So you have to dynamically allocate more memory as you read the file.

A data set always starts with -1 and ends with -1. After the starttag comes the description tag: 2411 is for nodes, 2412 is for elements.

*dk - dont know

Nodes have format:
-1
2411
%d %d %d %d (index dk dk dk)
%f %f %f (x y z)
...
-1

Elements have format:
-1
2412
%d %d %d %d %d %d (index type dk dk dk nbnodes)
...
-1

Format varies with type of element
type = 11 (beams)
%d %d %d (dk dk dk)
%d %d (node1 node2)

type = 41 (triangles)
%d %d %d (node1 node2 node3)

type = 111 (tetrahedra)
%d %d %d %d (node1 node2 node3 node4)


Billy.

billy August 31, 2006 19:19

I started a program to read un
 
I started a program to read unv file format but I am not sure how to dynamically allocate memory in C++ and convert the data to OpenFOAM.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif unvToFoam.C

micpage18 August 31, 2006 20:15

I know nothing in programmatio
 
I know nothing in programmation but maybe it's more easy to make a program that convert unv to another format that OpenFoam can use, like gmsh format.

billy August 31, 2006 22:02

That I already have. Alhougth
 
That I already have. Alhougth I don't think it will work for all meshes.

hsieh September 1, 2006 07:47

Hi, Guys, Quite a while ago
 
Hi, Guys,

Quite a while ago, I was considering asking Mattijs to develop unvToFoam utility for us using our support contract. But, we decided to abandon it because we stopped our I-DEAS maintenace (the future of I-DEAS is questionable at this point). Now that Salome v3.2.1 can read/write unv format, maybe we should reconsider it. One major capability I am interested in is that, we can use "groups" to "merge" different types of elements (merge quad/Tri on the commone faces) and build a hybrid mesh.

Mattijs worked on this before. If anyone here is willing to co-share the cost, then, we are in. Please let me know if you have a support contract with opencfd and is willing to share the cost with us. If I remember it correctly, this will take few days of Mattijs' time.

pei

olesen September 1, 2006 08:18

Billy, Rather than writing
 
Billy,

Rather than writing an entire IO system yourself, you may wish to look at libmesh.

Assuming that you can harnesh libmesh to get a primitive mesh, the fluent/starcd conversions should give you an idea of how to generate a foam mesh ... or simply target a fluent/starcd mesh from there.

/mark

billy September 1, 2006 13:47

Hi Pei, Although unv format
 
Hi Pei,

Although unv format can support several data about mesh, BC, groups, etc. I think Salome only exports two datasets: nodes and elements.

The best would be Salome to export in OpenFOAM format or another simple format since as you said Ideas is being replaced by Unigraphics and I don't know if they will to continue to support unv format.


Billy.

hsieh September 1, 2006 15:44

Hi, Billy, I believe that S
 
Hi, Billy,

I believe that Salome v3.2.1 supports writing groups in unv format. It will be great if you can get Salome to support OpenFOAM format directly. But, I do not think it will happen soon.

There is a lot of discussions about Open Source codes common format (OpenFOAM, elmer, Code_Aster,..etc.). It looks like this group is in favor of unv format. In this case, even if EDS/SDRC stopped supporinting I-DEAS, the unv format will continue and live in the Open Source world. So, it will not be a waste for this effort. On www.caelinux.com, you can find some disscusions about this.

pei

billy September 1, 2006 16:06

I tried to develop it further
 
I tried to develop it further but I get a segmentation fault error. I don't know why this happens. I used some information of mshToFoam. Here is a tar of the utility:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif unvToFoam.tgz

Billy

billy September 3, 2006 19:45

Hi, This is the latest vers
 
Hi,

This is the latest version of unvToFoam. If anyone wants to try it and give me feedback.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif unvToFoam.tgz

It only reads tetrahedra and does not read any boundary data. autoPatch can be used to retrieve the patches.

santos September 4, 2006 12:38

Hello Billy I tried your ap
 
Hello Billy

I tried your application with a simple cube meshed with tetrahedra, and it works fine. Nice work!

Ill keep you updated with further testing.

Regards
José Santos

billy September 4, 2006 16:20

There is another problem: the
 
There is another problem: the file can only have two datasets 2411 and 2412. If it has more, it will fail. So you have to edit the file manually and erase other datasets if they exist.

olesen September 11, 2006 12:57

In case anyone is interested,
 
In case anyone is interested, I tossed together two scripts for converting between unv and pro-STAR format, which helps with the import/export from Foam: http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif unv_star_conversion.tar.gz

I've also written a small foamMeshToUnv utility, but does anyone know how the boundary regions are specified in the UNV format?

/mark

billy September 11, 2006 13:35

I discovered that Elmer also i
 
I discovered that Elmer also imports UNV format. I just looked very breifly at the source code. I am not sure they can read regions.

http://www.csc.fi/elmer/

Maybe you can check here:

http://www.sdrl.uc.edu/uff/uff.html

micpage18 September 12, 2006 16:13

Hi Billy, I tried to use y
 
Hi Billy,

I tried to use your program unvtofoam with OpenFoam 1.2 but I'm not able to make it run. Can you please make a little tutorial where you explain the procedure to use it. Something like the step from the installation of unvtofoam until the conversion of the mesh.

Thank you,

MP

billy September 12, 2006 19:17

OK. I would do the followin
 
OK.

I would do the following:

1. Copy the latest tar to directory: $HOME/OpenFOAM/OpenFOAM-1.2/applications/utilities/mesh/conversion

2. Go to this directory and untar using: tar -xzvf unvToFoam.tgz (This should create a new folder named unvToFoam. In this same directory you have gmshToFoam, mshToFoam, etc.)

3. Still in this directory type: wmake unvToFoam this will compile it and create an executable.

4. If your OpenFOAM installation is correct you should be able to type unvToFoam for example in your home directory and it should run.

5. Create a tetrahedral mesh in Salome and export to unv format (ex: piston.unv). Ensure file has only two datasets 2411 and 2412. You can open the file in a text editor and check it. Datasets start with -1 and then the code of the dataset. ex:
-1
2411
...
-1

6. Then create a new case (ex: piston) in a solver (ex: stressedFoam) using FoamX .

7. Copy the file to the directory of that case.

8. Type: unvToFoam $FOAM_RUN/tutorials/stressedFoam piston $FOAM_RUN/tutorials/stressedFoam/piston/piston.unv

9. You can use autoPatch for example to create new patches.

10. Then use FoamX to assign BC and define the simulation.


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