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

Moving mesh problem OpenFoam 141

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

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2008, 10:14
Default Hello everybody Context: I'
  #1
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
Hello everybody

Context: I'm coupling a FEM code (Feap) and OpenFOAM to solve FSI problems by a partitionned strategy. I try to validate this coupling.
To be more precise, i'm using the solver icoDyMFoam of OpenFOAM 1.4.1. The mesh is solved with the following options :

// ---------- dynamicMeshDict ---------
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver velocityLaplacian;
diffusivity quadratic inverseDistance 1(movingWall);
// --------------------------------------------------

As from other post and sources [1] it seems that the quadratic inverse give the best results.

Unfortunately, when the motions become to big (for problem with a small stiffness), it seems the computation crash due to bad motion (see pictures [2]) of the mesh that become non-convex.

Is this for you due to bad mesh construction, bad options to solve the mesh motions or any other idea ?

Thank you.

[1] Automatic Mesh Motion for the Unstructured Finite Volume Method by Hrvoje Jasak and Zeljko Tukovic

[2] Pictures
velocity field: <https://perso.crans.org/kassiotis/op...velocity74.jpg>
initial mesh: <https://perso.crans.org/kassiotis/openfoam/mesh0.jpg>
deformed mesh with problem: <https://perso.crans.org/kassiotis/openfoam/mesh74.jpg>
alia likes this.
kassiotis is offline   Reply With Quote

Old   March 21, 2008, 13:01
Default Hello, For this sort of mot
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Hello,

For this sort of motion you really need to use a vertex-based mesh motion techniques rather than the FV motion you have chose. Vertex-based motion described in my/our paper is available in the SVN version of OpenFOAM - the Forum will show you how to get it.

In terms of motion, we have done MUCH more severe cases than yours with reasonable success. Examples are in some of my presentations, available on:

http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/

You can also find a series of moving mesh movies in:

http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/movies/

Example most similar to yours is an oscillating NACA airfoil with a sharp trailing edge:

Oscillating NACA airfoil - FEM mesh motion

Specification of mesh motion I use is typically something like this:


twoDMotion yes;

solver laplaceFaceDecomposition;

diffusivity quadratic;

frozenDiffusion off;

distancePatches
(
oldInternalFaces
);


In your case, 2-D motion should be set to yes.

Please have a go and tell me more about problems you encounter.

Enjoy,

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

Old   March 21, 2008, 15:32
Default When large rotations come into
  #3
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
When large rotations come into play, I have very good experience with the displacement Solid Body Rotation fvMotionSolver.......

Hrv, why do you suggest a vertex-based technique for this kind of motion???

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 21, 2008, 18:41
Default Hrv, why do you suggest a ve
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Quote:
Hrv, why do you suggest a vertex-based technique for this kind of motion???
Because it is better - much much better.

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

Old   March 22, 2008, 05:54
Default Referring to your tetDecomp st
  #5
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Referring to your tetDecomp stuff, it is a very nice method and very robust. Unfortunately, I need some rotational motion solvers (like the SBR Stress model) which is not implemented for your tetDecomp solvers.

So, Christophe, I would say, just play with all motion solvers (tetDecomp, displacement FV and velocity FV) to find which one is best suited for your problem.

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 25, 2008, 14:03
Default Hello Hrv, A Good day to yo
  #6
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello Hrv,

A Good day to you! Been a while since my last post :-)! Though... have been keeping my eyes open on everything that has been going on here!

I had a short question, and it would be great if you could shed some light (as usual)....

Could you tell me something about the Deformation Energy and Distortion Energy motion diffusivity options you have implemented in the vertex based motion solvers ?

Under what situations would you use these diffusivity methods, and what are the advantages and disadvantages compared to the other methods?

Also, what would a good value be for the exponent in each case? (Or even better... how could one decide on a good value?)

Have a nice evening!

Philippose
philippose is offline   Reply With Quote

Old   March 25, 2008, 17:39
Default A lovely paper for you: @
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
A lovely paper for you:


@Article{Jasak:MeshMotion,
author = {Jasak, H. and Tukovic, Z.
,
title = {Automatic Mesh Motion for the Unstructured Finite
Volume Method},
journal = {Transactions of FAMENA},
year = 2007,
volume = 30,
number = 2,
pages = {1-18}
}}

http://powerlab.fsb.hr/ped/kturbo/Op...tionFAMENA.pdf

It's all explained there (by Zeljko) with examples, definitions etc. and all in English

Enjoy,

Hrv

P.S. Please refer to paper where appropriate - Zeljko needs all the exposure he can get for the wonderful work he did for his PhD and since.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 25, 2008, 18:08
Default Hi again, Thanks a lot Hrv.
  #8
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi again,

Thanks a lot Hrv.... :-)!

I just finished re-converting the force based mesh motion solver I had written a while ago to use tet decomposition (I had used it in OF-1.3 with tet decomposition long time ago...), and am currently running a test case...

Everything seems to be working perfectly fine, and I am looking forward to trying it on one of the more difficult cases tomorrow (hopefully!)

So now its time to look through the paper from Zeljko... !!

Shall indeed refer to the appropriate papers at every possible opportunity :-)!

Philippose
philippose is offline   Reply With Quote

Old   April 2, 2008, 05:51
Default Hi everybody, Sorry to answ
  #9
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
Hi everybody,

Sorry to answer you after this kind support only now, but last week was really busy for me - but not only for work ;)

I manage to download and use OpenFoam-1.4.1-dev (after some adventures were I try to compile it, but never succeed...I think I'm not really gifted for this kind of stuff)...and the binaries. So it's working now on my computer.

I play a little with the solvers:
  • velocityLaplacian (the same as in OpenFoam-1.4.1) give more or less the same results.
  • laplaceFaceDecomposition seems to be more robust - for my case - but really slower. Maybe this is normal? ("there is no free lunch")
  • To impose non-uniform condition, I'm really lost : I consider a face with 90 nodes and 44 faces. With velocityLaplacian, in the file pointMotionU, I impose the 90 velocity at the 90 nodes...no problem ; with laplaceFaceDecomposition the solver asks for 134 values of velocities in the file motionU (I can imagine that is the nodal values + the face values...but in wich order? ). Is it possible to impose value only at nodes with laplaceFaceDecomposition?
  • I notice that I'm not able to use something like deformationEnergy of distorsionEnergy with the solver velocityLaplacian. Is this normal? If or if not, do you have an example for the dynamicMeshDict file for this case?
  • displacement* solvers and especially displacementSBRStress ask for pointDisplacement files...this is logical. Do you think it is a good idea to use one of them - but for the testing problem i'm not really able to impose a displacement linearly depending of time for the moment - I will look maybe in this direction...

Thank you for answers, even If my questions are maybe not so clear ;)


--
Christophe KASSIOTIS
fumiya likes this.
kassiotis is offline   Reply With Quote

Old   April 2, 2008, 11:56
Default Heya: - laplaceFaceDecompos
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Heya:

- laplaceFaceDecomposition is slow. Yes - cellDecomposition is faster. In order to get robustness I need more points and that is why. The best I can offer is cellDecomposition and then relax mesh motion convergence tolerances

- in all cases, points go first, then face centres (face decomposition only) and then cell centres.

- you've got mapping functions which will take point or cell data and interpolate to points or points/faces, depending on decomposition. Beware of compilation switches, it is very difficult to cleanly spearate this...

- fancy diffusivities came from Zeljko's PhD and we did vertex-based motion. You should be able to move them to cell-based motion as well - the algorithm is the same, but field type and run-time selection tables are different.

Enjoy,

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

Old   April 2, 2008, 12:28
Default Thank you for the quick answer
  #11
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
Thank you for the quick answer Hrv,

When I want to use something like cellDecomposition, I get the following message:

7
(
displacementSBRStress
pseudoSolidFaceDecomposition
displacementComponentLaplacian
velocityLaplacian
displacementLaplacian
laplaceFaceDecomposition
velocityComponentLaplacian
)


A small grep -r laplaceCellDecomposition give me as an answer the file tetDecompositionMotionSolver.H with the following lines seems to be of interest:

#ifdef CELL_DECOMP
TypeName("laplaceCellDecomposition");
#else
TypeName("laplaceFaceDecomposition");
#endif


If I understand what I read in the code and what you say:
Quote:
Beware of compilation switches, it is very difficult to cleanly spearate this...
I need probably to recompile the part in src/tetDecompositionMotionSolver. Did I understand well ? If yes, how can I do this ? (I'm not the kind of guy who is able to compile thinks with flag in 1s ). For instance, did I need to do a wmake . tetDecompositionMotionSolver with an option?

I will also try to impose the good value for a laplaceFaceDecomposition solver with mapping fonction and say if I have some problems...

Thank you

CK
kassiotis is offline   Reply With Quote

Old   April 2, 2008, 16:17
Default You need to link cellDecomposi
  #12
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You need to link cellDecompositionMotionSolver or recompile the application with CELL_DECOMP option.

Enjoy,

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

Old   April 3, 2008, 08:30
Default Hello everybody, Thank you
  #13
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
Hello everybody,

Thank you again for answering Hrv;
I have agains two questions:
  • laplaceFaceDecomposition: seem to work really well when I impose at each face center a mean between the point velocity and allow really big deformations (see Picture [2]). However, for the moment, I'm doing this by "hand" in the input file. Do you think It can be possible to impose only value at point, and that OpenFOAM is doing the interpolation (i'm sure it is possible, but I don't know really were I have to modify things)
  • laplaceCellDecomposition: I think I manage to make it work by "linking" (see code [1]). But I'm not sure it's really calling the good solver: the solver ask also for value at node center -- they are useless if I understood properly what is doing cellDecomposition as a decomposition...and more distrubing the results are exactly the same has faceDecomposition. Do you think I'm in fact calling an faceDecomposition solver ? Or the example I'm using don't give significant differences ( e.g. : motion too small, 2d ) ?
Thank you.

[1] : dynamicMeshDict file

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
twoDMotion yes;
motionSolverLibs ("libcellDecompositionMotionSolver.so");
solver laplaceCellDecomposition;
diffusivity quadratic;
frozenDiffusion off;
distancePatches ( movingWall );
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


[2] : moving Mesh pictures with a laplaceFaceDecomposition solver. Problem treated : imposed velocity for the "moving Wall" only in y direction, linearly depending of x (imposed at each node by "hand").
at time 0.46: <https://perso.crans.org/kassiotis/openfoam/mesh_laplacefacedecomposition_046_fac evelocitiymean.png>
at time 0.46 with a zoom: <https://perso.crans.org/kassiotis/openfoam/mesh_laplacefacedecomposition_046_fac evelocitiymean_zoom.png>
at time 1.00:
<https://perso.crans.org/kassiotis/openfoam/mesh_laplacefacedecomposition_100_fac evelocitiymean.png>
at time 1.00 with a zoom:
<https://perso.crans.org/kassiotis/openfoam/mesh_laplacefacedecomposition_100_fac evelocitiymean_zoom.png>

CK
fumiya likes this.
kassiotis is offline   Reply With Quote

Old   April 3, 2008, 09:16
Default Sorry, cannot see the pictures
  #14
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Sorry, cannot see the pictures.

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

Old   April 3, 2008, 09:35
Default Now it's working (due to a mis
  #15
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
Now it's working (due to a misspelling with majuscules).

CK
kassiotis is offline   Reply With Quote

Old   April 3, 2008, 10:10
Default Have a look at icoFsiFoam:
  #16
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Have a look at icoFsiFoam:

pointVectorField solidPointsDispl =
cpi.interpolate(Usolid - Usolid.oldTime());

vectorField fluidPatchPointsDispl =
interpolatorSolidFluid.pointInterpolate
(
solidPointsDispl.boundaryField()[solidPatchID].
patchInternalField()
);

motionUFluidPatch ==
tppi.pointToPointInterpolate
(
fluidPatchPointsDispl/runTime.deltaT().value()
);


The first one takes the data on the solid patch (cell centres) and interpolates it into points.

The second one takes the point data and interpolates from solid to fluid.

The third one takes the point data (that is mesh points) and interpolates into whatever the motion solver wants: for cell decomposition it just uses cell data, for face decomposition it will do a face centre as well in a consistent manner.

Have a look at

tetPolyPatchInterpolation/tetPolyPatchInterpolationCellDecomp/tetPolyPatchInterp olationCellDecomp.H

for other available functions, depending on whatther you know the motion on points or cell centres.

//- Interpolate from faces to points
template<class>
tmp<field<type> > faceToPointInterpolate
(
const Field<type>& ff
) const;

template<class>
tmp<field<type> > faceToPointInterpolate
(
const tmp<field<type> >& tff
) const;


//- Interpolate from mesh points to tet FEM points
template<class>
tmp<field<type> > pointToPointInterpolate
(
const Field<type>& ff
) const;

template<class>
tmp<field<type> > pointToPointInterpolate
(
const tmp<field<type> >& tff
) const;


Enjoy,

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

Old   April 7, 2008, 09:42
Default For the one interested, I have
  #17
New Member
 
Christophe Kassiotis
Join Date: Mar 2009
Location: Paris
Posts: 17
Rep Power: 17
kassiotis is on a distinguished road
For the one interested, I have made a short rapport on the moving mesh subject. Hope that will help someone.

Please, be kind with my (poor) English ! And remind this is only a draft for the moment

<https://perso.crans.org/kassiotis/op...movingmesh.pdf>

CK
hfs and Pab like this.
kassiotis is offline   Reply With Quote

Old   April 14, 2008, 22:13
Default Hello, Hrv, I noticed your
  #18
New Member
 
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17
richard is on a distinguished road
Hello,

Hrv, I noticed your first post in this thread mentioned simulations of airfoils with sharp trailing edges..
I have been working on some NACA0012 simulations and seem to be having trouble with the potential solution at the trailing edge. (Note laminar and turbulent simulations are working fine)

The problem is that at an angle of attack, the velocity field tries to "bend" around the sharp trailing edge
i.e. the first mesh points surrounding the TE point go from very high velocity on the pressure side through to low velocity on the suction side of the wing. The cell point on the tip of the sharp TE is approximately the average of the values surrounding it.

Case set-up is:
2D
rectangular domain, rotated about the airfoil for an angle of attack
tetrahedral mesh (thanks gmsh)
airfoil: slip boundary (have also tried symmetryPlane)
inlet, top, bottom: U = 10m/s, p = zeroGradient
outlet: U = zeroGradient, p = 0
Schemes are all from the tutorial, except I'm using 6 orthogonal correctors because of the tetrahedral mesh.

I have tried chopping off the sharp edge, and increasing the mesh density around the blunt edge but the same problem persists near the square edges. Also it is not really a suitable solution for me because unfortunately the shape of the TE matters for what I am trying to do.

Do you (or anyone else!) know how to solve this?

Thank you,
Richard.
richard is offline   Reply With Quote

Old   April 15, 2008, 03:14
Default Essentially, how do I apply th
  #19
New Member
 
Richard Jones
Join Date: Mar 2009
Location: Adelaide, South Australia, Australia
Posts: 22
Rep Power: 17
richard is on a distinguished road
Essentially, how do I apply the Kutta-Joukowski condition on the TE?

R
richard is offline   Reply With Quote

Old   April 15, 2008, 15:58
Default well, if what you are after is
  #20
pbo
Member
 
Patrick Bourdin
Join Date: Mar 2009
Posts: 40
Rep Power: 17
pbo is on a distinguished road
well, if what you are after is only the potential-flow solution around a lifting body, you are better off using a panel method (simpler and cheaper).

If you really want to stick to the FVM for that (a bit of an overkill), try and enforce a zero velocity on the 2 airfoil cell faces sharing the trailing edge (define them as a separate patch). That could do the trick for 2D airfoils with non-cusped TE.

Patrick
pbo 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 Mesh Problem Rashad FLUENT 0 August 28, 2006 05:31
moving mesh problem eos Siemens 4 January 27, 2006 21:42
moving mesh problem walid Siemens 6 April 1, 2005 18:31
Moving mesh problem Samir Siemens 0 November 10, 2004 14:35
Moving mesh problem Jan Majer Siemens 2 June 10, 2003 05:19


All times are GMT -4. The time now is 04:42.