CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Dynamic moving mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2005, 21:14
Default Hi, Started v6.1, Fluent i
  #1
Pei-Ying Hsieh (Hsieh)
Guest
 
Posts: n/a
Hi,

Started v6.1, Fluent implemented dynamic moving mesh which support birth/death of elements. I am wondering if OpenFOAM has something similar.

For example, a piston moving inside a cylinder. The computational domain changes with time. There are two ways to attack this:

1. keep the number of elements the same, but "squeeze" the elements when the piston moves toward the head of the cylinder.
2. Keep the element sizes about the same, but, dynamically removes the number of elements.

Pei
  Reply With Quote

Old   February 14, 2005, 21:18
Default sounds like Kiva as well ...
  #2
Kuan Tek Seang (Seang)
Guest
 
Posts: n/a
sounds like Kiva as well ... i noticed a kivatest directory somewhere in the package ...
  Reply With Quote

Old   February 15, 2005, 05:03
Default Yes OpenFOAM includes this fu
  #3
Henry Weller (Henry)
Guest
 
Posts: n/a
Yes OpenFOAM includes this functionality.
  Reply With Quote

Old   February 16, 2005, 04:40
Default Hi, I've placed an 2D wedge
  #4
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Hi,

I've placed an 2D wedge example of how the this works here:

http://www.tfd.chalmers.se/~nordin/foam/engineEx.mpg

The layer where cell addition/removal is performed can be anywhere in the domain.
That means that you can either have the piston remove cell layers as the layer become 'small enough' or you can have the entire mesh move upwards and remove the layer at the top/deck.
In this example I've placed the addition/removal layer somewhere in between and as this layer hits the deck the mesh motions switches from layer addition to 'squeezing'.
The left part show you the entire picture while the right is just a zoom-in on the top part.

If you are interested in another mesh motion example there is the channel flow with a vibrating 'floor'
http://www.tfd.chalmers.se/~nordin/f...ingChannel.mpg

Niklas
  Reply With Quote

Old   February 16, 2005, 09:10
Default Hi, Niklas, These two movi
  #5
Pei-Ying Hsieh (Hsieh)
Guest
 
Posts: n/a
Hi, Niklas,

These two movies looked very cool.

In the engineEx.mpg movie, toward the end of the simulation, I saw some clouds of green dots at the upper left corner, what are they?

Also, I have a cylinder that does not have a straight wall. It is somewhat conical. The radius at the bottom is about 10% smaller than the radius at the top. I do not have a piston, but a small pipe coming down toward the bottom of the cylinder. The cylinder is about 10% filled with liquid. Is it possible to create a cylindrical block the wraps the pipe. This portion will be moving mesh. And create another block that is stationary mesh which contains the rest of the geometry? An interface between the two meshes will be needed in this case (this is how Fluent attach this type of problem). Do you FOAM can handle something like this? Thanks!

Pei
  Reply With Quote

Old   February 16, 2005, 09:24
Default A combination of automatic me
  #6
Hrvoje Jasak (Hjasak)
Guest
 
Posts: n/a
A combination of automatic mesh motion and my mesh modifiers should cover it - you need a combination of a layer addition/removal and a sliding interface + appropriate mesh motion setup.

Enjoy,

Hrv
  Reply With Quote

Old   February 16, 2005, 09:32
Default Heya Niklas, Nice animatio
  #7
Hrvoje Jasak (Hjasak)
Guest
 
Posts: n/a
Heya Niklas,

Nice animation - is that spray doing the right thing, i.e. do you get problems loosing particles or similar on layer removal? Any problems with the simulation: spikes in the pressure trace for example. BTW, is this compressible?

Hrv
  Reply With Quote

Old   February 16, 2005, 11:30
Default Hi, Yes, the green dots is
  #8
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Hi,
Yes, the green dots is the spray.

And no Hrv, the new tracking algorithm does not lose particles
In fact, it can not lose particles and if you are trying to lose them anyway, i.e you treat them incorrectly at the boundary, you will end up in an infinite loop (my choice since I dont want particles flying outside the domain)
The only restriction is that it must be possible to draw a line from cell centre to face centre without crossing a face.

Yes, the calculation is compressible and yes there are 'spikes' in the pressure, but this is depends on where you do the layer addition/removal and how small you want the cells before removing them... and time step.

It also seems to be more difficult adding layers than removing them!!!

And if I remember correctly removing cells at the piston top is worse than doing it somewhere 'in the middle'.

N
  Reply With Quote

Old   February 16, 2005, 12:57
Default Thanks for that, I bet you're
  #9
Hrvoje Jasak (Hjasak)
Guest
 
Posts: n/a
Thanks for that, I bet you're really proud of not losing particles - well done (there's a very few people in CFD today who can say the same)!

Any hope of a warning/debug when there's no way from the infinite loop - that would be useful info! [:-)]

We'll need to do something about the spikes at some stage, although this business with layer addition vs. removal is against my intuition. If you break the layering, pls let me know as there's a number of fixes I've got for a future release...

Enjoy,

Hrv
  Reply With Quote

Old   February 18, 2005, 19:38
Default I am interested in the vibrati
  #10
Xiaofeng Liu (Liu)
Guest
 
Posts: n/a
I am interested in the vibrating floor in the channel flow case.

http://www.tfd.chalmers.se/~nordin/f...ingChannel.mpg

My understanding is that we should specify the wall moving velocity motionU(x,y,t) for that 2D case. When I dig into the source code for the motionSolver, I felt a little bit lost.

Does any one can show me some sample code to specify that motionU on the moving wall?
  Reply With Quote

Old   February 19, 2005, 10:04
Default Here's a piece of my original
  #11
Hrvoje Jasak (Hjasak)
Guest
 
Posts: n/a
Here's a piece of my original code from a while back. The setup is now much easier, using the motion solver - have a look at the current state of OpenFOAM-1.0/applications/utilities/mesh/manipulation/moveMesh

(I am one version ahead, so mine might me slightly different). Add

# include "setBoundaryMotion.H"

into moveMesh (your copy, of course!) before the points are moved. The file looks like this (you may want to read in the amplitude and frequency in from a control file and do additional tricks with findPathcID, so that the patch can be given by name etc etc.) I could not be botherred, mut here is a simple case with lots of comments :-)

The first lot calculates the boundary motion from the nodal coordinates and the last line sets the boundary condition for mesh motion:

ms.motionU().boundaryField()[movingPatchID] == motionBCPatch0;

This will work both for the face and cell decomposition.

There will be a paper coming out soon on the automatic mesh motion I have developed and implemented in foam and I would be grateful if people could refer to it in their applications/reports/papers - consider it a price to be paid for the work! :-)

setBoundaryMotion.H

{
label movingPatchID = 0;

scalar xfreq = 50;
scalar xampli = 0.0001;
scalar xlength = 0.01;

scalar xom = 2.0 * physicalConstant::pi*xfreq ;
scalar xomx = 4*physicalConstant::pi/xlength ;

// This statement gives you the position of points on the patch

const vectorField& motionPatchPoints =
ms.motionU().mesh().boundary()[movingPatchID].localPoints();

// This statement creates a vector field of the same size,
// which is set to zero

vectorField motionBCPatch0(motionPatchPoints.size(), vector::zero);

// This statement calculates the desired motion velocity
// and puts it as the y-component of the vector field above.
// The velocity will be different for every vertex.

Info << "Lift: " << xampli*Foam::sin(xom*runTime.value()) << endl;

motionBCPatch0.replace
(
vector::Y,
(
xampli*Foam::sin(xom*runTime.value())
*Foam::cos(xomx*motionPatchPoints.component(vector ::X))
- motionPatchPoints.component(vector::Y)
)/runTime.deltaT().value()
);

// This statement sets the velocity we have just calculated
// as the boundary condition for mesh motion

ms.motionU().boundaryField()[movingPatchID] == motionBCPatch0;
}
  Reply With Quote

Old   March 2, 2005, 09:13
Default Hi, Niklas, I am wondering
  #12
Pei-Ying Hsieh (Hsieh)
Guest
 
Posts: n/a
Hi, Niklas,

I am wondering if you can email me the steps to set up the moving mesh? Or any simple case file you have.

In my project, I will also need to setup a sliding interface. I have no idea how this is done in OpenFOAM.

Thanks!

Pei
  Reply With Quote

Old   March 2, 2005, 11:11
Default Hi, > I am wondering if yo
  #13
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Hi,

> I am wondering if you can email me the steps to
> set up the moving mesh? Or any simple case file
> you have.

I'm hoping this will be included in the next release of OpenFOAM

> I will also need to setup a sliding interface.
> I have no idea how this is done in OpenFOAM.
Neither do I.

N
  Reply With Quote

Old   March 3, 2005, 06:01
Default sliding interface: the mixer2
  #14
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
sliding interface: the mixer2D tutorial case uses a sliding interface. The ./Alltest script should run the case or you can run it by hand.

Have a look at the createSlider application which creates all the nessecary files.

Mattijs
  Reply With Quote

Old   March 3, 2005, 06:12
Default Well, it seems that I am the
  #15
Hrvoje Jasak (Hjasak)
Guest
 
Posts: n/a
Well, it seems that I am the only one who knows precisely what needs to be done (I wrote the code). I would be happy to help, but under the condition that you convert your case into a fully-fledged tutorial and write up the setup for the manual.

In this way, we can easily extend the number of available tutorials and I won't have to explain the whole thing again.

Hrv
  Reply With Quote

Old   March 3, 2005, 11:17
Default Hi, Hrv, That will be great
  #16
Pei-Ying Hsieh (Hsieh)
Guest
 
Posts: n/a
Hi, Hrv,

That will be great! If you can email me the steps to setup a moving mesh (with cell birth and death) with sliding interfaces, I will complete the tutorial case and write the detailed setup for the manual. This case will invlove air and water, so, interFoam will be applied.

Thanks!

Pei
Peiying2003@yahoo.com
  Reply With Quote

Old   June 6, 2005, 08:59
Default Hi, Can anybody help me ???
  #17
albi80
Guest
 
Posts: n/a
Hi,
Can anybody help me ???
I want to simulate an air flow into an engine with a LES solver (oodles), but in the geometry there is a moving mesh (piston)... How can I do it???
Thanks
  Reply With Quote

Old   June 6, 2005, 09:13
Default The easiest way would be to re
  #18
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The easiest way would be to replace the construction and calls of the turbulence model in engineFoam with the equivalent LES model construction and calls from Xoodles.
henry is offline   Reply With Quote

Old   June 6, 2005, 11:05
Default Hi Henry, excuse me but this
  #19
albi80
Guest
 
Posts: n/a
Hi Henry,
excuse me but this was not what I meant. My geometry is a simple box with a moving wall, so I haven't any crank angle....
  Reply With Quote

Old   June 6, 2005, 11:09
Default Is your flow compressible or i
  #20
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Is your flow compressible or incompressible?
henry is offline   Reply With Quote

Reply


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
moving (dynamic) mesh gives fluctuating pressure daniel FLUENT 1 July 31, 2010 15:32
dynamic meshing, rotating moving mesh...... madhan FLUENT 1 January 24, 2007 00:55
Moving Dynamic Mesh in Fluent 6.2 R.M.Bharath Somayaji FLUENT 0 January 9, 2006 21:36
Moving(dynamic) mesh in Fluent yonghyun FLUENT 1 January 25, 2005 15:50
moving solid in dynamic mesh James FLUENT 1 October 4, 2002 08:22


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