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

Moving mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2009, 19:13
Default Hallo Foamers, currently i
  #81
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road
Hallo Foamers,

currently i am spending weeks to settle up a testcase with an harmonic oscillating plate. The mesh already exists and also my testcase with all files. Is is was set up basing on the dynamicmesh-tutorials. The configuration isnīt very complicated and easy to understand.

The problem: The mesh motion doesnīt seem to be correct, the plate isnīt moving at all, the cells around do a little oscillation but only a little bit.

It would be a great help if someone with more experience could check my setup and maybe run the movingDynamicMesh one time.

For easy understand there is a description with images in the zip file and many comments in the correspondig files (motionU, 0/U, boundary, dynamicmeshdict, ...) Again it would be a great help and one big step forward in my thesis work!

Regards,
Patrick Riemer

Setup was done in 1.4.1-dev

patriem is offline   Reply With Quote

Old   February 3, 2009, 19:23
Default
  #82
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road

patriem is offline   Reply With Quote

Old   February 3, 2009, 19:37
Default Finally;) http://home.arcor
  #83
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road
Finally;)

http://home.arcor.de/patrickriemer2/actuator.tar.gz
patriem is offline   Reply With Quote

Old   February 4, 2009, 13:09
Default Thank you Mathieu, iīm try
  #84
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road
Thank you Mathieu,

iīm trying that right now. maybe my timestep was to high....

Another i think very important thing:
At the moment i use laplacefacedecomposition and a motonU file with oscillatingFixedValue b.c. to define mesh-motion. Version 1.4.1-dev. But i am not sure about the appropriate files:

src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/
Is the internal-meshpoint motion dscribed here?

src/OpenFOAM/fields/PointPatchFields/derived/oscillatingFixedValue/OscillatingFi xedValuePointPatchField.C
Is the movement/velocity of the oscillating b. c. described here?

Having a simple cos-equation of the velocity, these files have to changed and recompiled then, right? In both cases with wmake libso in the openfoam-folder?

Thank you for answers...
Regards
Patrick
patriem is offline   Reply With Quote

Old   February 4, 2009, 14:47
Default If you use laplacefacedecompos
  #85
Member
 
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 77
Rep Power: 17
mathieu is on a distinguished road
If you use laplacefacedecomposition, you only need to change this file:

src/OpenFOAM/fields/PointPatchFields/derived/oscillatingFixedValue/OscillatingFi xedValuePointPatchField.C

and recompile with " wmake libso " in the src/OpenFOAM folder.


The file src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/ is not "linked" to the laplacefacedecomposition motion solver (as far as I know).

Mathieu
mathieu is offline   Reply With Quote

Old   February 8, 2009, 20:27
Default Ooops ! If one modifies the
  #86
Member
 
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 77
Rep Power: 17
mathieu is on a distinguished road
Ooops !

If one modifies the file:

src/OpenFOAM/fields/PointPatchFields/derived/oscillatingFixedValueOscillatingFix edValuePointPatchField.C

then the recompilation must be done like this:

cd ~/OpenFOAM/OpenFOAM-1.4.1-dev/src/tetDecompositionFiniteElement
./Allwmake

Sorry !

Mathieu
mathieu is offline   Reply With Quote

Old   February 19, 2009, 09:09
Default Hi everyone... is there any
  #87
New Member
 
olivier braun
Join Date: Mar 2009
Location: Lausanne, Switzerland
Posts: 19
Rep Power: 17
obraun is on a distinguished road
Hi everyone...

is there any detailed documentation about the moving mesh stuff out there than going through the code line by line?

I am doing some moving mesh stuff, an oscillating pitching motion at the time being, mainly using CFX and we decided spending a little time to see if this is feasible in OpenFOAM. Got along the first basic tutorials, and up to now things seem fine.

Now I have implemented a special mesh motion based on purely algebraic rules and implemented as UserFortran in CFX and it works fine. I want just to underline this rule determines the deformation of the entire mesh, not only the boundary. It is just a simple blending of a solid body rotation in the vicinity of the foil and zero displacement at the test section walls.

Where could I hook this up in OpenFOAM? I basically have a few lines of code that allow me to compute displacement per timestep based on t, and x,y,z, being it of the former step, being it initial positions, whatever.

Any advice at which tutorial example to look first is welcome, it is easy to get lost in it, or did I just not find the right documents that go with it ?

Final goal is to add the mesh motion into the oodles solver, but that's for later once I really understood how to recombine features of different apps.

BTW we aim at medium reduced frequencies, so that at the one hand the mesh motion should not too heavily impact on stability and accuracy with the time steps needed for LES, and at the other we can afford solving for all the time interval needed for the motion of the profile. This is something we clearly cannot do with a limited number of licenses of a commercial tool...

Kind Regards

Olivier
obraun is offline   Reply With Quote

Old   February 19, 2009, 09:24
Default Hi Olivier, OF is very appr
  #88
Member
 
Christof Benz
Join Date: Mar 2009
Posts: 52
Rep Power: 17
chbenz is on a distinguished road
Hi Olivier,

OF is very appropriate for moving meshes. A good start is the movingCone tutorial in
$FOAM_TUTORIALS/icoDyMFoam. Oscillating Boundary conditions for the motion is also available in OF.

Literature you can find on the homepage from Prof. Jasak http://www.h.jasak.dial.pipex.com/.

Regards,
Christof.
chbenz is offline   Reply With Quote

Old   February 19, 2009, 09:24
Default Hi Oliver, Basically, ther
  #89
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi Oliver,

Basically, there are different ways to define the displacements of all mesh points, i.e. to define a complete motion solver (living in dynamicMesh) or to define a dynamicFvMesh based class in with you define the mesh points of either only the boundaries, or all mesh points, using the newPoints() function.

Here is an example library, derived from dynamicFvMesh, which defines the mesh points using newPoints(). It is just an oscillation of internal nodes. Here it is: .
Just put it in your own myDynamicFvMesh lib, or something like that.

Goodluck,
Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 19, 2009, 09:29
Default Allright, the message board is
  #90
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Allright, the message board is not behaving like it should.

Take it from here:
http://www.zswk.nl/~frankbos/downloa...rnalFvMesh.tgz
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 19, 2009, 13:02
Default Hi Frank, Thanks a lot for
  #91
New Member
 
olivier braun
Join Date: Mar 2009
Location: Lausanne, Switzerland
Posts: 19
Rep Power: 17
obraun is on a distinguished road
Hi Frank,

Thanks a lot for the useful hints. The dynamicInternalFvMesh looks pretty much precisely like what I need. I still did not capture everything about how to hook it up and make it effective and we have some install issues about recompiling I have to check with our admin... but thanks to you I feel it might be faster to go than I initially thought.

Olivier
obraun is offline   Reply With Quote

Old   February 19, 2009, 13:57
Default Hi Olivier, No problem. Wh
  #92
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi Olivier,

No problem. Why don't you use the existing mesh motion solvers? Is it for comparison with CFX?

You said something about blending the rotation to the outer boundaries. Take a look at the new RBF mesh motion solver in OF-1.5-dev. The new mesh points are calculated based on Radial Basis Function interpolation, including some cut-off (blending) function towards the outer domain. You may find it usefull.

Cheers, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 20, 2009, 04:57
Default Hi Frank, right, if I want
  #93
New Member
 
olivier braun
Join Date: Mar 2009
Location: Lausanne, Switzerland
Posts: 19
Rep Power: 17
obraun is on a distinguished road
Hi Frank,

right, if I want to compare flow simulation results, I want to be sure that at least the mesh motion is the same. In fact, people here doing pitching hydrofoil studies before experienced lots of trouble with the high aspect ratio hex elements behind at a thin trailing edge meshed with a C-grid approach...when using the CFX built in diffusion or fluent's spring stiffness...

Starting from this on I looked into mesh motion procedures, also in context of morphing for optimization. RBF is one of them. The dev thing in OF-1.5-dev might refer to Computers and Fluids 2008 paper by ,uhhhmmm, Jakobsson and Amoignon... doing precisely what you described.

In fact my optimization objectives are the outcomes of a pitching cycle simulation using RANS.

Finally I want to validate these by a more elaborate (let's say fancy :-)) approach like DES, LES...

Well it's kind of mixing different things into a tasty dynamic mesh jam and as I was sure to be able to handle all these motions algebraically, I did not want to rely on any diffusion, spring stiffness or whatever black box scheme. Now that I have it implemented, I see it is very efficient (close to no cost at all) and conserves 100% mesh quality in the zones of interest. So why should I go for something else? In my opinion, using PDE-solvers when you can have a rigid body rotation plus a blend is kind of overkill. For sure the PDE method has the advantage of being generally available once it works fine, that's why the commercial codes got them quite quickly and that implementing user-controlled mesh motion is quite a pain in...

Have a nice weekend

Olivier
obraun is offline   Reply With Quote

Old   February 20, 2009, 07:19
Default Hallo Foamer-Community, i s
  #94
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road
Hallo Foamer-Community,

i set up a testcase with a moving mesh including layeraddition/removal based on the movingconetopo tutorial. If i run a moveDynamicMesh, i soon get bad cells and faces near or on my moving boundary. It is an oscillating plate in a cavity. Could you please have a short look on what is going on there?
I think my meshmodifier and dynamicmeshdict is right so i donīt understand where my error is.

Much thanks and regards
Patrick

http://rapidshare.com/files/20031991...po.tar.gz.html
patriem is offline   Reply With Quote

Old   February 24, 2009, 06:54
Default Hello, for an oscillating s
  #95
New Member
 
patrick riemer
Join Date: Mar 2009
Location: Uni Stuttgart, Germany
Posts: 19
Rep Power: 17
patriem is on a distinguished road
Hello,

for an oscillating sine motion with vel_amp_x=0.226m/s and frequency of 128Hz i used oscillatingVelocity and a pointMotionU with


type oscillatingVelocity;
omega 804.096; //=2*pi*f
amplitude (0.226 0 0);
value uniform (0 0 0);

But the oscillating amplitude seems to be much too high. what do i do wrong? The oscill....C file under fvMotionSolver/pointPatchFields/derived/oscillatingVelocity
is standard with
(p0_ + amplitude_*sin(omega_*t.value()) - p.localPoints())
/t.deltaT().value()
);

Thank you for a hint
patriem is offline   Reply With Quote

Old   June 10, 2009, 03:50
Default
  #96
Member
 
John Wang
Join Date: Mar 2009
Location: Singapore
Posts: 73
Rep Power: 17
cwang5 is on a distinguished road
Hi guys,

I'm kind of new to the programming part of OpenFOAM, and ran into a couple of problems so far.

Frank mentioned something about adding the files into a myDynamicFvMesh lib, but I am clueless as to how to proceed, is there a tutorial somewhere I can follow? I've searched the forum for "edit lib" or "add lib" and came up empty.

Thanks in advance for any helps.

John
cwang5 is offline   Reply With Quote

Old   June 11, 2009, 03:37
Default
  #97
Member
 
John Wang
Join Date: Mar 2009
Location: Singapore
Posts: 73
Rep Power: 17
cwang5 is on a distinguished road
Quote:
Originally Posted by cwang5 View Post
Hi guys,
Frank mentioned something about adding the files into a myDynamicFvMesh lib, but I am clueless as to how to proceed, is there a tutorial somewhere I can follow? I've searched the forum for "edit lib" or "add lib" and came up empty.
Right, so I searched a couple more post and found the solution by searching the term add src", turned out that I should've used the wmake libso command instead of wmake.
cwang5 is offline   Reply With Quote

Old   June 12, 2009, 05:33
Default
  #98
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,904
Rep Power: 33
hjasak will become famous soon enough
Your problem is that the FEM boundary condition does not necessarily hold the value: the value is already held within the internal field. Have a look at how I did it in the FSI solver.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 18, 2009, 05:31
Question
  #99
New Member
 
olivier braun
Join Date: Mar 2009
Location: Lausanne, Switzerland
Posts: 19
Rep Power: 17
obraun is on a distinguished road
I meanwhile implemented my mesh motion similar to the fvDynInkJet example, recomputing all of the mesh node positions based on simple algebraic rules, just for an oscillating profile. So far so good, but I now just wonder what I have to specifiy as boundary condition for the oscillating profile:

Is zero velocity ok (which means velocity is automatically interpreted as relative to the moving mesh)

Or do I have to re-specifiy the same oscillation as a function again to be coherent with the motion in an absolute frame consideration?

Sorry I am not experienced enough to dig into the depths of all the basic routines to find it out mayself, and I hope one of the gurus has a quick answer to this simple question.

Regards

P.S.: And i just see the angularOscillatingVelocityPointPatchVectorField would be about what I need if i need to

Olivier

P.P.S: And that the question is related to what "U.CorrectBoundaryCondition" does, which is not so obvious to understand for someone not familiar with the deep hierarchy of the dynamicFvMesh class...

P.P.P.S: ok, the movingWallVelocity seems to solve the problem, at least the velocity values in the results are continuous at the boundary now, U representing the velocity in absolute frame, being equal to the wall motion velocity at the boundary. Is this what it should be like, I suppose...

Last edited by obraun; September 18, 2009 at 11:57. Reason: adding some info about what I found myself
obraun is offline   Reply With Quote

Old   September 3, 2010, 15:35
Default FSI in OF
  #100
New Member
 
Daniele Trimarchi
Join Date: Mar 2010
Location: Southampton, Uk
Posts: 11
Rep Power: 16
Daniele Trimarchi is on a distinguished road
Hi Foamers,
I'm trying to do FSI with OF 1.6.x, and for the moment I'm trying a code-code coupling passing files.
Now, I manage to read the file for boundary-cell displacement using something 'stolen' from IcoStructFOAM: similar to what hjasak suggested in the thread
[QUOTE=hjasak;179117]When in doubt: cheat :-)

This is the (working) code:

volVectorField::GeometricBoundaryField &meshDisplacement =
const_cast<volVectorField&>(mesh.objectRegistry::l ookupObject<volVectorField>("cellMotionU")).bounda ryField();

label fluidSideI = mesh.boundaryMesh().findPatchID(sail);

vectorField &mDisp=refCast<vectorField>(meshDisplacement[fluidSideI]);

List<vector> dispVals(fluidMesh.size());

std::ifstream fin("Displ_out");

forAll(fluidMesh,i) {
fin >> u;
fin >> v;
fin >> w;

dispVals[i][0]=u;
dispVals[i][1]=v;
dispVals[i][2]=w;

vector dd = dispVals[i];;

mDisp[i]=dd;
}


This works fine, since it assignes values from the file to the referenced boundary field of the volVectorField in cellMotionU.

Now, if I want to do similar things for pointMotionU, I gets troubles, because it is a pointVectorField, and I can't find how to deal with it's boundary field.

The only things which seems to be working is:

pointField& pointMotion = const_cast<pointField&>(mesh.objectRegistry::looku pObject<pointField>("motionU"));

Which gives access to the pointField, but no way to get to the boundaryField


Any help would be more than welcome..!
Daniele Trimarchi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Reference frame - UDF - Moving mesh modisa FLUENT 0 April 18, 2008 14:31
Moving Mesh & Not Rotating Mesh AB Siemens 1 October 25, 2004 04:10
moving mesh Jim Siemens 2 August 27, 2002 08:39
moving mesh zqf Siemens 1 June 19, 2002 02:30
moving mesh khb Main CFD Forum 1 June 5, 2002 11:46


All times are GMT -4. The time now is 14:30.