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

Update of the variables after dynamic mesh motion.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2012, 13:19
Default Update of the variables after dynamic mesh motion.
  #1
New Member
 
Join Date: Jun 2011
Posts: 13
Rep Power: 14
gtg258f is on a distinguished road
Dear all,


I have a question regarding the update of the different variables or fields after a mesh deformation.


I solve a solid problem, and for a while was using the standard procedure for the deformation of the solid phases in the solid solvers offered in openFOAM (the latest I used is moveMesh from elasticNonLinSolidFoam). From my understanding, this deformation is Lagrangian, meaning that each of the mesh points is moved by the displacement U obtained at that location.


Such procedure works fine for close to solid body deformations. In my case, I have quite large compressions in some regions and not in others. As a result, a purely Lagrangian formulation leads to a deterioration of the mesh quality. I thus adopted the procedure that is used for fluid phases and am using the dynamic mesh motion capabilities (more precisely the displacement Laplacian with inverse distance diffusivity with respect to the moving boundary).


This yields a much better mesh, but .. I am not sure that my fields are transferred properly: The solution reached differs depending on my choice of mesh motion procedure.


As an example, Fig 1 (compareOldNewMotion_T50.png) shows the deformation of a cylinder subjected to a pressure load on the inner surface, with two different mesh motion procedures (moveMesh vs. dynamic mesh). Dynamic mesh definitely yields a better mesh quality, but the displacement and pressure profiles differ …


The procedure I follow for the mesh deformation is as follows:
Code:
pointVectorField pointsDispl =  cpi.interpolate(U); 
displacementSolidPatch == pointsDispl.boundaryField([solidPatchID].patchInternalField(); 
mesh.update();
where cpi is the cell to point interpolator. Taking a given time step, I looked into what happens to my fields before and after mesh.update(); Cell coordinates and volumes are updated but all other fields remain the same. While that would be correct in a purely Lagrangian deformation, it is not for an arbitrary mesh deformation. This is illustrated in Figure 2 (transferOfFieldU.png) which shows the displacement (U) profile before update (Eulerian), the profile that would be obtained when plotting U vs. the old coordinates+the displacement (Lagrangian) and the profile obtained after mesh.update().


I think I am missing something about the transfer of variables but haven't been able to find the answer in the different tutorials. Should I do an interpolation from the Lagrangian mesh to the smoother one obtained using mesh.update()? Would you have an example solver in mind that I could follow?


Thank you for any help,
Diane
Attached Images
File Type: jpg compareOldNewMotion_T50.jpg (54.0 KB, 258 views)
File Type: png transferOfFieldU.png (17.2 KB, 112 views)
gtg258f is offline   Reply With Quote

Old   December 21, 2012, 16:59
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by gtg258f View Post
I solve a solid problem, and for a while was using the standard procedure for the deformation of the solid phases in the solid solvers offered in openFOAM (the latest I used is moveMesh from elasticNonLinSolidFoam). From my understanding, this deformation is Lagrangian, meaning that each of the mesh points is moved by the displacement U obtained at that location.


Such procedure works fine for close to solid body deformations. In my case, I have quite large compressions in some regions and not in others. As a result, a purely Lagrangian formulation leads to a deterioration of the mesh quality. I thus adopted the procedure that is used for fluid phases and am using the dynamic mesh motion capabilities (more precisely the displacement Laplacian with inverse distance diffusivity with respect to the moving boundary).


This yields a much better mesh, but .. I am not sure that my fields are transferred properly: The solution reached differs depending on my choice of mesh motion procedure.
Hi Diane,

You are right that the elasticNonLinULSolidFoam solver adopts a Lagrangian approach, so it assumes that there is no mass transfer in or out of each cell. So when the mesh is moved, it is moved using the solved-for displacements meaning there is no convection (mass transfer) between the cells.

But in your case when you move the mesh using the fluid mesh motion classes then there will be a flow of mass across the cell surfaces and the momentum carried by this convection needs to be accounted for.

So essentially you need a solver using an Arbitrary Lagrangian Eulerian (ALE) approach instead of an/a updated/total Lagrangian approach. An ALE approach is where the mesh coincides with the material deformations only at the boundary and independent of each other elsewhere. ALE methods are often employed for modelling solids which undergo very large deformation e.g. extrusion and metal forming processes.

The bad news is that there is no OpenFOAM ALE for solids (although I think it is used for interface tracking in interTrackFoam).

The good news is that OpenFOAM is perfectly suited for ALE for finite volume (FV) solids as it has all the convection and mapping stuff.
Also there is considerable literature on ALE methods for solids.

If you do intend to develop an ALE FV solid solver then I can help you if you like.

Best regards,
Philip
bigphil is offline   Reply With Quote

Old   January 7, 2013, 03:27
Default
  #3
New Member
 
Join Date: Jun 2011
Posts: 13
Rep Power: 14
gtg258f is on a distinguished road
Hi Philip,

First of all, happy new year!!
Sorry for the late reply, I went on a internet-break over the Christmas vacations!

I have been reading about ALE already, and believe that this is indeed what I will have to do as my solids deform to much for me not to loose mesh quality over time.

I would be delighted to discuss the matter with you when you have time. Especially mapping as it is something I am not familiar with and I guess that talking about it with you could make things go much faster!

Let me know when and how you would prefer to do that.

Best regards,
Diane
gtg258f is offline   Reply With Quote

Old   January 10, 2013, 12:20
Default
  #4
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 16
Hisham is on a distinguished road
Hi Phil and Diane

Very interesting topic ... can you please keep the discussion here!

Best regards,
Hisham
Hisham is offline   Reply With Quote

Old   January 12, 2013, 17:10
Default
  #5
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Hisham,

I will post here when I start getting some interesting results.

A nice description of ALE methods is given in the online Encyclopedia of Computational Mechanics - Chapter 14 - Arbitrary Lagrangian-Eulerian Methods.

Best regards,
Philip
bigphil is offline   Reply With Quote

Old   January 13, 2013, 00:22
Default
  #6
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 16
Hisham is on a distinguished road
Thanks and best of luck
Hisham is offline   Reply With Quote

Old   February 14, 2013, 15:49
Default
  #7
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Hi,

I am working currently on a solver with a moving mesh. Actually one boundary of a domain is changing according to the solution of some other equation.
I implemented the mesh changes similar to icoSructFoam solver.
But to update my mesh I need to add following line:
HTML Code:
 mesh.update();
which is not included in icoSructFoam...

I am confused because my mesh is not get updated without this command, but mesh in icoSructFoam is updated...


Anyway more important/confusing is that my solution, after mesh is updated, behaves somehow strange. Energy is added to the system, what is not a case if mesh is not deformed...
It happend for a advection-diffusion equation, which should just diffuse with time.
It behaves like that if mesh is not changed. But if it is changed, energy is somehow added to the system and field gets stronger and stronger with time...

I hope anyone will have any suggestions.

ZMM
ziemowitzima is offline   Reply With Quote

Old   February 14, 2013, 18:24
Question
  #8
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Hi,

HTML Code:
mesh.update();
is not a problem anymore, I found the differences between my solver and icoStructFoam.

But I still have the problem with energy being added to the system after mesh is changed.
It happens for simple diffusion equation:
HTML Code:
fvScalarMatrix omEqn
        (
        dimDt*fvm::ddt(om)
       - fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om)
         );        
        omEqn.solve();
if mesh does not change, or change only "a little" then it behaves as diff equation, namely field "om" diffuses out, and getting weaker.
But if mesh is changed "little more than a little" then "om" gets stronger and stronger with each time step...

Do you have any clue why it is like that ??

thanks
ZMM
ziemowitzima is offline   Reply With Quote

Old   January 16, 2014, 18:28
Default
  #9
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 62
Rep Power: 15
alundilong is on a distinguished road
Quote:
Originally Posted by ziemowitzima View Post
Hi,

HTML Code:
mesh.update();
is not a problem anymore, I found the differences between my solver and icoStructFoam.

But I still have the problem with energy being added to the system after mesh is changed.
It happens for simple diffusion equation:
HTML Code:
fvScalarMatrix omEqn
        (
        dimDt*fvm::ddt(om)
       - fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om)
         );        
        omEqn.solve();
if mesh does not change, or change only "a little" then it behaves as diff equation, namely field "om" diffuses out, and getting weaker.
But if mesh is changed "little more than a little" then "om" gets stronger and stronger with each time step...

Do you have any clue why it is like that ??

thanks
ZMM
Hi ziemowitzima,

I am also stick to this problem. Do you have any clue?
alundilong is offline   Reply With Quote

Old   January 18, 2014, 11:08
Default
  #10
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 62
Rep Power: 15
alundilong is on a distinguished road
Quote:
Originally Posted by ziemowitzima View Post
Hi,

HTML Code:
mesh.update();
is not a problem anymore, I found the differences between my solver and icoStructFoam.

But I still have the problem with energy being added to the system after mesh is changed.
It happens for simple diffusion equation:
HTML Code:
fvScalarMatrix omEqn
        (
        dimDt*fvm::ddt(om)
       - fvm::laplacian(dimensionedScalar("1",dimensionSet(0, 2, 0, 0, 0),1), om)
         );        
        omEqn.solve();
if mesh does not change, or change only "a little" then it behaves as diff equation, namely field "om" diffuses out, and getting weaker.
But if mesh is changed "little more than a little" then "om" gets stronger and stronger with each time step...

Do you have any clue why it is like that ??

thanks
ZMM
Have you ever tried to subtract flux caused by boundary moving?
fvScalarMatrix omEqn
(
dimDt*fvm::ddt(om)
- fvm::laplacian(dimensionedScalar("1",dimensionSet( 0, 2, 0, 0, 0),1)
- fvm::div(mesh.phi(), om), om)
);
alundilong 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
Dynamic Mesh Problem. Tom Clark FLUENT 10 June 21, 2021 05:27
potentialFreeSurfaceFoam with Dynamic Mesh GuilhermeMP OpenFOAM Programming & Development 1 October 6, 2013 04:05
Dynamic Mesh moving interface help akash.iitb FLUENT 0 August 24, 2010 00:53
dynamic mesh motion (angularOscillatingDisplacement) in OF1.6 tamas.baksa.hu OpenFOAM Running, Solving & CFD 4 May 13, 2010 13:22
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 17:37.