
[Sponsors] 
September 18, 2006, 08:43 
Hi,
The mesh motion works u

#1 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Hi,
The mesh motion works using the latest development code using the oscillatingFixedValue boundary condition. Now I am considering oscillating bodies (flat plates and cylinders) on different grids at low Reynolds numbers to see how the grid motion behaves. I've got the following questions/remarks: 1) On coarse grids the meh motion performs very nicely, but on finer grids the mesh gots distorted near the body causing the flow solver to diverge. Since the oscillatory motion stays the same, but the cells are smaller (on the finer grid) the relative cell displacement is increased, i.e. the boundary of the body moves multiple cell sizes within one timestep. Besides choosing a very very small timestep, is there a good solution for this?? 2) So, what are the ideal motion solver settings for this kind of problems? 3) At my place, another moving mesh method is developed using radial basis functions. This method is capable of using very large time steps without severe mesh destortion near the moving body boundary. How difficult is implementing such a new mesh motion algorithm in OpenFOAM?, or is this almost impossible? 4) I am also trying to expand the oscillatoryFixedValue boundary conditions towards a 6 DOF boundary condition which could handle arbitrary functions for 6 variables (not only oscillatory functions). Do you think this is feasible? Is it smart to start with the movingFlapFvMesh class from OpenFoam 1.2? 5) In the development sources, I am using, a top level Fluid Structure Interaction solver is present, icoFsiFoam. Is there also a tutorial available for this, just as an example how to define a problem using this solver. Unfortunately I haven't seen prof. Jasak's presentation at the 5th ICCSM, but I have read the paper and I'm impressed. Best regards, Frank
__________________
Frank Bos 

September 18, 2006, 14:55 
Heya,
Nice to hear you got

#2 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Heya,
Nice to hear you got it working. 1) You need tuning. First, choose a better diffusion algorithm to limit mesh deformation next to the moving boundary. Second, carefully tune solver tolerances. Doing too much work in the solver makes the algorithm expensive (cannot really help) and too little accumulates motion errors. 2) There is a Thesis  dr. Zeljko Tukovic. Unfortunately, it's still being translated to English (sigh) 3) Easy: if you can define how the mesh moves (use radial functions like everybody else), just use new poilt locations to execute mesh motion  everything else remains the same 4) For a 6 DUB solver, you need to calculate forces and moments onto the surface and solve an ODE (ordinary diferential equation). Both should be trivial  see liftDrag for the forces, and ODE solvers are already impelmented 5) Yes, I've got a tutorial of sorts but people are waiting to publish their results. Once that happens, I'm happy to release the tutorial as well. BTW, you haven't seen my presentation at ICCSM 'cause it's on Thursday :) Have fun, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

October 16, 2006, 05:28 
Hi,
I succeeded in perform

#3 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Hi,
I succeeded in performing a 2D oscillating cylinder simulation (see my website, link below) with oscillatingFixedValue boundary condition. My problems (of diverging motion solver) were caused by a time step which was too large. Right now I used 800 timesteps within one vortex shedding cycle which works actually quite good for the mesh motion. In general this time step size is sufficient to capture the relevant flow physics of this problem. Then I tried to solve the mesh motion of a simple 3D problem: a moving cube inside a cube shaped domain. I solved the mesh motion for a fixedValue boundary condition with motion in 3 directions of 1 m/s. As you can see on my website, the cube body is moving correctly in 3 directions, but also the boundary of the domain is moving (only in xdirection). I got similar (strange) results using the oscillatingFixedValue boundary condition (not shown). The mesh motion was nice, but of course this motion of the domain is not good. I updated my website to show you the flow and motion solver settings, along with some results: www.aero.lr.tudelft.nl/~frank then go to Research > CFD > OpenFOAM moving mesh. So, my question: Does anyone got any ideas why the (oscillating)fixedValue boundary conditions in my 3D problem lead to an additional motion of the domain boundaries? Regards, Frank
__________________
Frank Bos 

October 16, 2006, 05:55 
Hi,
Try following BC for mo

#4 
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 10 
Hi,
Try following BC for motionU: outlet { type fixedValue; value uniform (0 0 0); } inlet { type fixedValue; value uniform (0 0 0); } Regards, Zeljko 

October 16, 2006, 07:53 
Thanks Zeljko, it works!
T

#5 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Thanks Zeljko, it works!
Too easy, I should have seen it myself :S Regards, Frank
__________________
Frank Bos 

October 20, 2006, 10:47 
Hi again,
Does anyone know

#6 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Hi again,
Does anyone know how to use subsets of meshes in order to only move the subset directly around the moving body. That probably will reduce the computation time considerably. I've already created a mesh using Gambit, which consists of a 'inner' and an 'outer' mesh. These two different parts are recognised by foamMeshToFoam and 2 different sets are created in the constant/polyMesh directory. How do I set the boundary conditions in such a way that the motion is only applied to the inner set? Thanks and have a good weekend! Frank
__________________
Frank Bos 

October 20, 2006, 11:03 
Yup, I've already done that: m

#7 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Yup, I've already done that: make a subset, create a motion solver on it. Once the motion is solved for, use the functionality of the subset to map onto the complete mesh for motion and you're done.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

October 30, 2006, 11:38 
mmm, I dont think that I under

#8 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
mmm, I dont think that I understand it correctly.
When I look in the constant/polyMesh/sets directory, there are already some subsets present from the fluentMeshToFoam conversion. Isn't it possible to call the subsets that I want to move from dynamicMeshDict? If not, do I have to include the motion on the subset and the mapping, you referred to, in my user solver. Is there a tutorial on this? Regards, Frank
__________________
Frank Bos 

November 29, 2006, 16:37 
Hi everybody.
I updated my

#9 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Hi everybody.
I updated my site with some new problems, this time considering the use of subsets: http://www.aero.lr.tudelft.nl/~frank/index.php?id=research/cfd/OpenFOAM/movingme sh/2D_movingmesh_wing In order to move/deform the mesh around an oscillating wing I tried using no subset, one subset containing the inner part and one subset containing the outer part of the computational domain, see the site. 1) No subsets result in severe mesh distortion near the leading and trailing edges of the wing. Most likely, this is also the reason for the very slow convergence, which I addressed in another tread on this forum. 2) The inner part as a subset led to similar results. 3) The outer part as a subset deforms that part nice, but the inner part remains unchanged, which leads to the overlapping of both regions. I used the subsetMotionSolverFvMesh library from prof. Jasak's sources. Is this the thing you mentioned in the post above? What is alpha doing? The best solution for my problem seems to use two subsets together. The inner subset moving fixed to the wing, preserving high quality cells in the boundary layer. The outer subset deforming accordingly. =============== So my questions: 1) Did I make any mistakes implementing a subset using subsetMotionSolverFvMesh? please check my site... 2) How can I use two subsets together. On rigidly moving, the other deforming accordingly. (Could someone maybe share an example using multiple subsets?) =============== This are the problems I am facing now. When solved, I want to extend this model to 3D for further use in my PhD. I am very very eager to overcome these problems, since I don't want to return to Fluent (bad experiences). Regards and thanks in advance, Frank
__________________
Frank Bos 

November 30, 2006, 04:53 
Have you seen the pictures at

#10 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Have you seen the pictures at the bottom of this page:
OpenFOAM training Wiki A proper choice of variable diffusivity in mesh motion is likely to solve your problem. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

November 30, 2006, 08:21 
Allright, thanks....it seems t

#11 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Allright, thanks....it seems to work with a diffusion coefficient depending on deformationEnergy or distortionEnergy.
All distance based diffusion coefficients, constant, linear, quadratic and exponential do not work at all. In those cases the mesh collapses, as shown on my site. In your paper 'Automatic mesh motion for the unstructured FVM', you also used distance based diffusion for the pitching airfoil. 1) Is there a reference with info about deformationEnergy or distortionEnergy? What means the constant (gamma) which is needed? From my previous post: 2) How can I use two subsets together. On rigidly moving, the other deforming accordingly. (Could someone maybe share an example using multiple subsets?) Regards and thanks, Frank
__________________
Frank Bos 

November 30, 2006, 08:33 
Here we go again:
All dis

#12  
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Here we go again:
Quote:
The reference for the other 2 diffusion methods is a PhD Thesis by dr. Tukovic. A constant gamma is the diffusion coefficient you will start with in the mesh motio equation. From the example you are showing it seems to me you time step for the mesh motion algorithm is much too large. Could you please tell me what is the boundary motion in terms of nearwall mesh size in a single timestep  that would be the mesh motion Courant number. Multiple mesh motion: You can use as meany subsets as you like, provided they do not overlap. If they do, you will need to update them in a reasonable order and call them one at a time. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

November 30, 2006, 09:29 
Sorry to bother you.
With

#13 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Sorry to bother you.
With 'they do not work at all' I mean that using those distancebased methods the mesh collapses just after maximal amplitude. For the moving mesh testing I used dt=0.005. When I solve for the flow I use adjustableRunTime with a maximum Co of 2. The boundary motion is prescribed using the oscillatingFixedValue b.c. a pure sine motion. The maximal velocity is 2*pi*f = 1.57. The smallest cellsize (at leading and trailing edges) is about 0.0036. Together with a timestep of about 0.005 the mesh courant number becomes more or less 2.18. This is worst case, since all other cells are larger and the velocity is maximal only a short time. So you think that I should be able to use the distance based methods when I reduce the timestep even further?? Btw, the mesh I used is only for testing, I really need a much denser mesh for my research, so a much smaller timestep. While you were writing the post, I just found the theory of the other 2 diffusion methods in dr. Tukovic PhD thesis. It's a pity that it's in croatian, but that issue is already mentioned a couple of times in this forum. Multiple mesh motion: How do I create multiple subsets, using subsetMesh. Using subsetMotionSolverFvMeshCoeffs, only one set is taken an moved. How do I use two sets together? Frank
__________________
Frank Bos 

November 30, 2006, 11:25 
Try running it the with mesh C

#14 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Try running it the with mesh Co number of 0.5 and see if it gets any better.
The Thesis is being translated (I know, there was nothing I could do about the choice of language at the time). It will be made available when we're done with it. In the meantime, there is a series of accompanying papers coming out and I'm sure to advertise :) As for multiple subsets, nobody says the subsets need to be connected. You can have two "islands" of mesh motion operating independently. If this is not what you want, look at how I did mesh motion on a subset and modify the class to include multiple subsets  that's easy. Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 1, 2006, 12:28 
Allright, when I decrease the

#15 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Allright, when I decrease the timestep 4 times, the mesh Co number gets around 0.5 and the mesh moves a lot better using linear or quadratic. Constant diffusion leads to a lot of skewness near the leading and trailing edges.
I get the best meshes at the largest timesteps for the distortionEnergy and deformationEnergy diffusion coefficients. Nevertheless it seems that the flow solver covergence put a much tighter restriction on the timestep than the motion solver. I do understand that multiple subsets are possible, but I do not know how to use them together. From gambit to openFOAM, I end up with two sets (inner_fluid, outer_fluid) from which I create subsets with 'subsetMesh'. How do I configure these in /constant/dynamicMeshDict and /constant/motionSubset/dynamicMeshDict?? All I can think of is: rewriting subsetMotionSolverFvMesh in order to make it possible to define two or more subsets in dynamicMeshDict. Regards and thanks, Frank
__________________
Frank Bos 

February 21, 2007, 06:21 
Dear prof. Jasak.
At my de

#16 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Dear prof. Jasak.
At my department people are also working with a cfd code which uses radial basis functions to update the mesh point positions in time. Those people are very happy with the robustness of this method. At this point, I am able to solve the flow around a translating and rotating 3D object using OpenFOAM. I would like to compare your method (solving laplace equation) with the radial basis functions method. My questions: 1) Did you ever consider to implement the radial basis function method? From a previous post I conclude that you are aware of this method (you suggest that everyone is using it). If not, why? 2) Will a different motion method be hard to implement. Which classes do I have to modify? Regards, Frank
__________________
Frank Bos 

February 21, 2007, 09:03 
Heya,
No, I did not impleme

#17 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,797
Rep Power: 23 
Heya,
No, I did not implement radial basis functions and indeed I know very little about the subject. Basically, if you want to move the mesh in OpenFOAM, all you need to do is to calculate the new point position in any way you like and depending on any parameters you like. Calling mesh.movePoints(newPoints) with you newPoints will give you all the support in motion and discretisation you need further on. Come to think of it, this is really cool! :) Thus, you can start just by using radial basis functions in your toplevel code to calculate the new point position and you are in business. If you want to pack it further, you cna create a new type of dynamicFvMesh with radial basis functionbased motion and using runtime selection. I'd like to see it when you get it done, as well as learn some theory. Thanks, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

January 15, 2008, 10:20 
Dear all,
I have a problem

#18 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Dear all,
I have a problem with the use of mesh subsets in parallel. Basically I have a developed a library based on subsetMotionSolverFvMesh which generates 2 subsets, one innerMesh and one outerMesh. For both subsets the initial conditions, motion parameters and solver settings are defined in: /0/motion1Subset /0/motion2Subset /constant/motion1Subset /constant/motion2Subset /system/motion1Subset /system/motion2Subset I define a very high uniform diffusivity on innerMesh and a quadratic inverseDistance diffusivity on the outerMesh, such that the innerMesh moves nicely with the wing !!! It is really working perfect, but not in parallel :( The problem is always something like this: > FOAM FATAL ERROR : index 1024 out of range 0 ... 87 So the solver is looking outside the subset array......but in serial it works fine! 1) Has someone encountered similar problems ? Any ideas how this can be solved ? 2) Could someone please confirm that fvMeshSubset should work in parallel ? Thanks and regards, Frank
__________________
Frank Bos 

January 15, 2008, 13:49 
2) It should. Can you recompil

#19 
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18 
2) It should. Can you recompile your application and fvMeshSubset.C with O0 g DFULLDEBUG and produce a traceback?
It helps running the separate processes in separate windows. The mpirunDebug script is one which does this (for local running). Have a look. 

January 15, 2008, 17:37 
Where can I find that mpirunDe

#20 
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 11 
Where can I find that mpirunDebug script ?
__________________
Frank Bos 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Dynamic Mesh tutorial Part I attachDetach  hsieh  OpenFOAM Running, Solving & CFD  5  October 11, 2012 15:00 
Can we add extra solid mesh part to the analsis?  Farhath Alam  FLUENT  0  December 22, 2006 03:41 
Designating a part of mesh as wall  megan  FLUENT  0  October 15, 2006 21:04 
Problem with rotational mesh deformation: Part II  NymphadoraTonks  CFX  2  November 4, 2004 04:05 
Moving part in a fluid  E. BOINOT  FLUENT  0  April 24, 2002 09:34 