CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Point the noob in the right way - IC Engine exhaust simulation (http://www.cfd-online.com/Forums/openfoam-solving/70217-point-noob-right-way-ic-engine-exhaust-simulation.html)

AndreF November 17, 2009 13:10

Point the noob in the right way - IC Engine exhaust simulation
 
Hi all,

First thing first, sorry to all if this isn't in the correct section etc etc etc. I'm new to the forum.

Just a bit of background: I'm a design engineer at a company that produces exhaust systems for high end motorsports applications. We are more and more looking into design and I want to give OpenFOAM a shot.

I digged out an average pc that was doing nothing, and now have ubuntu 9.10 and vista in dual boot.

I'm now in the process of installing OpenFOAM but as you may guess by this point I'm very fresh on all this so I would like a few pointers about some things if that's ok in order to do the right things for the purpose I intend to give the software.

We would be mainly looking at having a system modeled in CAD and on that perform a CFD study. My main concern in to know what is available to simulate the kind of flow present in an exhaust system and also if it is possible to capture the wave action that goes on, since it is not continuous flow.

At this first stage, since I'm only now installing I'm just looking for people to tell me what to go for, what packages to install, what to have in mind, what to ignore, etc... since I don't want it to do anything else other that exhaust systems.

Many thanks
Andre

AndreF November 18, 2009 12:22

Update:

Now managed to install OpenFOAM and gave a go at the first tutorial.

As far as I can see everything seems to work ok.

I have to do some more tutorials to get more familiarized with it all, anyone knows of tutorials more related to flow in exhaust pipes?

My second question is, given that it is defenetly turbulent flow and high Re and Mach number what solver sould I use?

Last question, should I need to model the complete engine air tract with the pistons as moving boundaries or can I model and mesh just the exhaust section and then somehow define a pulsating flow for the different runners?

AndreF November 20, 2009 05:33

OK, I know this might not be the right place for all this but it is a tidy way of you keeping track of my story.

I figured I needed something like Netgen because I will be importing my geometries from CAD files.

I managed to install all the required packages for Netgen except the Togl widget for tcl/tk. I spent ours trying to find a comprehensible way of installing it (for a linux noob) with no luck.

Hopefully you can point me in the right direction to where to find specific information about installing Togl for Netgen.

Thanks again in advance

AndreF November 23, 2009 08:49

Hi all,

I know that I'm a noob, and this is probably the wrong section etc etc etc, but any help would be appreciated.

Thanks

deepsterblue November 23, 2009 23:03

My experience with Netgen is only restricted to the basic crankshaft geometry that comes with it, so I can't help you too much there. I do know that installing it on Windows is fairly trivial. How about getting a basic mesh out of the Windows installation and converting it to FOAM? We can start from there.

Pulsating flow can probably be accomplished using a timeVarying type of boundary condition, so there's no need to model the entire system. You can progressively add complexity and physics as you go along.

Post your progress, and things will probably start to get familiar with time. Good luck.

AndreF November 24, 2009 04:24

Quote:

Originally Posted by deepsterblue (Post 237425)
My experience with Netgen is only restricted to the basic crankshaft geometry that comes with it, so I can't help you too much there. I do know that installing it on Windows is fairly trivial. How about getting a basic mesh out of the Windows installation and converting it to FOAM? We can start from there.

Pulsating flow can probably be accomplished using a timeVarying type of boundary condition, so there's no need to model the entire system. You can progressively add complexity and physics as you go along.

Post your progress, and things will probably start to get familiar with time. Good luck.

Hi deepsterblue,

Installing Netgen on windows was my first option to keep things as simple as possible but I didn't because my main machine with windows that I use for CAD etc everyday work has Vista 64bit.

Because I could only seen 32bit versions of Netgen I opted for giving it a try on ubuntu where openfoam is. Everything is fine except installing one of the required packages (Togl) to which I coulnd't find an instalation procedure detailed enough for me.

So at the moment I have OpenFOAM running, Netgen just waiting for Togl to be ready to run, and IGS file ready to mesh.

AndreF December 1, 2009 04:28

how hard can it be...? right...? :confused:

deepsterblue December 1, 2009 10:20

I managed to compile Netgen without too many problems on my x86_64 OpenSUSE installation. All I needed was the tk-devel and tcl-devel packages installed for the Netgen compile process, and pointing the configure script to my tcl-tk installation (using the --with-tcl / --with-tk options). I also installed Togl from the rpm (Netgen required the 1.7 version, and not the newer 2.0), available here:

http://sourceforge.net/projects/togl/files/

I don't see a Debian package for Ubuntu, but I'm sure someone has figured that out - you'll just have to search online for it. I also had to slightly modify the configure script in the Netgen source directory because the script couldn't locate my tkConfig.sh and tclConfig.sh scripts (it was looking for the files in /usr/lib, but my files were in /usr/lib64). But once that was done, the compile process was pretty smooth.

It would be much easier for someone to help you if you post the errors during the compile process, rather than simply stating that "it doesn't work"... Hope this will point you in the right direction.

AndreF December 1, 2009 11:02

Quote:

Originally Posted by deepsterblue (Post 238326)
I managed to compile Netgen without too many problems on my x86_64 OpenSUSE installation. All I needed was the tk-devel and tcl-devel packages installed for the Netgen compile process, and pointing the configure script to my tcl-tk installation (using the --with-tcl / --with-tk options). I also installed Togl from the rpm (Netgen required the 1.7 version, and not the newer 2.0), available here:

http://sourceforge.net/projects/togl/files/

I don't see a Debian package for Ubuntu, but I'm sure someone has figured that out - you'll just have to search online for it. I also had to slightly modify the configure script in the Netgen source directory because the script couldn't locate my tkConfig.sh and tclConfig.sh scripts (it was looking for the files in /usr/lib, but my files were in /usr/lib64). But once that was done, the compile process was pretty smooth.

It would be much easier for someone to help you if you post the errors during the compile process, rather than simply stating that "it doesn't work"... Hope this will point you in the right direction.

You're right deepsterblue, I should be more specific.

First thing is clarify my machines (I have two):

- 64bit processor with windows vista only, used everyday for CAD (would make sense installing Netgen here but I couldn't find a 64bit version);

- 32bit processor with vista and ubuntu 9.10. It was stored away and I dug it out just to try out doing cfd in it with openfoam is it is a dedicated machine that does nothing else at the moment. Has a fresh install of ubuntu.


Because of the above, I'm now trying to install Netgen in the 32bit ubuntu machine. So far on this list I am about to start step 5 (./configure).



But for that I need to have the required packages first, so I did that and:
  1. Tcl/Tk - done
  2. Tix - done
  3. Togl - not done
  4. GLUT - done (could only glutg3 so installed that)
At the moment I have the Togl-1.7.tar.gz package and tared it to the home folder and I find it very difficult to follow the instructions to installed that I get from different places.


This is from the Tolg sourceforce site:



How you link with Togl depends on how you're planning to use it. There are basically three ways of using Togl with your application:
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and link to the Togl stubs library with your executable or shared library. In this case you must call Togl_InitStubs() (and probably Tcl_InitStubs() Tk_InitStubs is only needed if you call Tk functions). This is the way the included Togl examples are built.
  • Link to the Togl shared library or "compile in" the Togl object files with your executable or shared library. In this case you must call Togl_Init() from your C code to initialize Togl.
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and then load it using Tcl commands or Tcl_PkgRequire(). Then use Tcl commands to create and manipulate the Togl widget.
In general I find it easy enough to follow linux installations but for this one the person that wrote it seems to assume that I know a few basic things that apparently I don't.

Again, sorry for not knowing how to do it and all help would be much appreciated.

AndreF December 10, 2009 07:55

any ideas?

deepsterblue December 10, 2009 10:21

Quote:

Originally Posted by AndreF (Post 238336)

How you link with Togl depends on how you're planning to use it. There are basically three ways of using Togl with your application:
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and link to the Togl stubs library with your executable or shared library. In this case you must call Togl_InitStubs() (and probably Tcl_InitStubs() Tk_InitStubs is only needed if you call Tk functions). This is the way the included Togl examples are built.
  • Link to the Togl shared library or "compile in" the Togl object files with your executable or shared library. In this case you must call Togl_Init() from your C code to initialize Togl.
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and then load it using Tcl commands or Tcl_PkgRequire(). Then use Tcl commands to create and manipulate the Togl widget.

These instructions are folks who are developing applications using Togl... The Netgen folks have taken care of that already. All you need to do is get the pre-compiled binaries, identify the location on your system where the headers / libraries need to go (something like /usr/lib/tcl/ or similar), and just copy them there. Thereafter, edit the configure script to make sure that the Netgen sources can see those files. It's really not that difficult to do...

AndreF December 10, 2009 10:26

I believe you :)

They way I found around it was to find that actually there is a 64bit version of netgen... I've installed it on the 64 bit machine and seems to work just fine.

Now I'm getting to grips of how to generate and control the mesh and from then on I'll be going to actually using OpenFoam.

Also, there appears to be a solver with netgen, ngsolve, i might give that a try too...

Axel_T December 16, 2009 06:04

importing geometries from CAD
 
Hi Andre,

i don't know anything about Netgen, but why don't you use the standard OpenFOAM utilities for mesh-generation?

I'm also new to OpenFOAM (and a CFD-beginner at all), but I managed to create a mesh by simply saving my CAD-file in stl format and using OpenFOAMs snappyHexMesh utility on it.
The result is quite ok.

Now I'm also looking for timeVarying inlet BC (that's why I found your topic).


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