CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   engine simulation with mesh motion and topological changes (

abminternet December 16, 2010 12:55

engine simulation with mesh motion and topological changes
Hi guys,

I have been trying to figure out how to set up a case for a cold flow simulation of an ic engine. I found a tutorial using an old solver which is no loger present in openfoam 1.6-ext (neither in 1.5-ext), and I would like to learn how to set up a case with the newer OF versions. Has anybody had any success? I am trying my luck with sonicTurbDyMEngineFoam without success. In my first attempt I used mesh motion only without topological changes, using the velocityLaplacian solver, and the piston moved slightly, then I tried setting it up with laplacdFaceDecomposition solver, but it gets stucked as soon as it gets to mesh.update(). I am really not sure if I have set up the case, and it appears to be almost no information on the net or forums, and the little information there is, is for previous versions using libraries that are apparently not there any more. Any ideas???
I would very much appreciate it.

Frederic Muller

Peter_600 December 18, 2010 11:37

Can you send me ur tutorial. I have some experiences with engineDyMFoam for 1.5-dev. I propably can help u, at least with the mesh motion. I know this is a quite challenging topic.


abminternet December 20, 2010 05:16

1 Attachment(s)
Hi Peter,

thanks for your reply. I have attached the tutorial file i got for an older OpenFOAM-ext version. there, -270 is the initial time directory, I had to remove the rest of them, except for the last one, because it was too big to upload here, but if you need the rest of the time directories please let me know and I will find a way to upload them. I appreciate any guidelines you could give me.

best regards,

faithhidy December 20, 2010 07:26

Hi Peter,

You said you have experience on the engineDyMFoam in 1.5-dev. Do you mean "icoDyMEngineFoam" ?
Curently, I am also troubled by using "simpleEngine" case to realize the mesh layerAdditionRemoval. If you run it succesfully,please help me.

Can you send me your case? My email address is .

Merry Christmas to you~


Peter_600 December 20, 2010 07:44

For the moment I still struggling with installing 16-ext in my system. I will come back to u guys as soon as possible. you can also contact me on my email.

abminternet December 20, 2010 08:16

@Josiah: Hey Josiah, I think we are stuck at the same part. I am trying to use sonicTurbDyMEngineFoam, and am also stuck with the topological changes. Mesh motion without topological changes seems to work, but I have only tried it with the velocityComponentLaplacian solver. Of course this is not enough, there is very little information about dictionary setup, etc, available. If you know anything please let me know, and I'll do the same for you.

@Peter: sure thing, don't worry, if we can be of help, please let us know.

Peter_600 January 8, 2011 08:17

Ok guys. I am ready :) Sorry for the big delay.
I would suggest we open a new group for ic engine simulations. Since something like this doesen t really exist. I opened a discussion group Join this group! We can discuss our projects together.

deepsterblue January 8, 2011 10:21

Will something like this work? The only limitation is that you would be restricted to pure tetrahedral / triangular meshes.

This stuff is already in 1.6-ext. Look at the circCylinder3d tutorial for some ideas. I can probably try and help you guys set it up, so let me know.

Peter_600 January 8, 2011 14:30

This is great :)
This is exactly what I am looking for. I will like to set up a case. Do u think it is also possible with spray interaction? I would like to simulate a direct injection engine, with spray....
Do you thin it s possible to use it with dieselEngineFoam?


deepsterblue January 8, 2011 14:35

I'm pretty sure it would be possible. The code for cloudMapping is not in there yet, but I think that should be taken care of with just one line of code. I would suggest getting getting the mesh to work first, then adding a flow solver, and finally adding the spray stuff.

Peter_600 January 8, 2011 14:58

Great :) I will do my best and working hard on it. Hope to provide you guys soon with a solution and of course everyone is welcome in contributing to it.


abminternet January 13, 2011 06:07

wow that is really amazing, it is also exactly what I am trying to do :) is it possible to do the same with 2 tilted valves? if you could help us set up this case, we would really appreciate it :) I have been trying for a while now, I've only got to moving the piston with layering, but as soon as I introduce the valves (straight in 2D still :( ) it doesn't go past the first iteration. Any ideas??

best regards,

deepsterblue January 13, 2011 09:38

The video there uses two tilted valves - so no problem there. I can probably try and set up a simple demo case, but that might take me a little time, so I may not be able to get to it immediately.

abminternet January 13, 2011 10:27

Thanks I would really appreciate it, I have been struggling with this for quite some time now. Are you using 1.5-dev or 1.6-dev? I guess the setup will be pretty much the same anyways. Don't worry if it takes you a while, any help you can provide now will be very much appreciated. I am really looking forward to seeing how you did that :D

Peter_600 January 13, 2011 14:49

Me too :)
i am working for the moment on a modification of the accordionEngineMesh class. I try to add to the piston motion a layering. If you have experiences in it we can create a new class in the meantime.

abminternet January 14, 2011 05:54

@Peter: Hi Peter, my programming skills are a bit limited but I would be quite interested on that, but I thought the accordionEngineMesh class already performed layering for the piston, am I mistaken?

Peter_600 January 15, 2011 09:53

I ve done somet simulation with the accordion class. And it uses no layering.
Have u seen someone who did that?
I will try to add it ;) But it will take me a while since I am also not so good in C++. Which strategies do u use for moving the mesh and which version of OpenFoam do u use?

abminternet January 18, 2011 05:20

I haven't actually used it or seen it work, but the description of the class at the beginning of the code says that layers are added and removed for the piston.

perhaps the class is not complete? let me know of your progress and if I can help, as I am also interested :D.
At the moment I am using OpenFOAM 1.6-ext, with sonicTurbDyMEngineFoam.
dynamicFvMesh simpleEngineTopoFvMesh;
solver laplaceFaceDecomposition;
diffusivity uniform 1.0;

it seems it only works with solvers based on the laplace equation for motion. Even though I still don't get past the first iteration :S, it seems to update the mesh, but I'm having troubles with my Temperature Boundary conditions. I am working at the moment with vertical valves while I get to know how it all works, but my aim is to do tilted valves with edge swapping and smoothing, or something similar :D so I'll be glad to see Sandeep's test case :)

deepsterblue January 18, 2011 14:16

I've posted a simple case for tilted valves. Use with moveDynamicMesh. It should be sufficient to give an idea about how it would be done.

You can find the necessary files here:

It's probably helpful to use ParaView to see how the patches are defined.

Peter_600 January 18, 2011 14:16

Since you are also using 1.6-ext, could you check if the dieselFoam tut runs for you to the end? For me it doesn t. I would like to include this solver, too. So I have to be sure if this is a bug or my Foam verison doesnt work properly.

I am also waiting unpaticently on the test case of Sandeep :)

All times are GMT -4. The time now is 15:53.