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

InterDyMfoam gives strange gamme if cell volume changes due to mesh motion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2009, 05:32
Default Hi, I am using interDyMfoam
  #1
New Member
 
Daniel Schmode
Join Date: Mar 2009
Posts: 22
Rep Power: 17
daniels is on a distinguished road
Hi,

I am using interDyMfoam in combination with mesh motion. It gives strange gamma values if cell volume changes due to mesh motion.

Find attached a free surface test case (derived from icoDyMFoam's the movingCone) an an animation showing the results.

The lower plots in the animation shows the MULES result: gamma is exceeding one, if the cell volume is decreasing due to mesh deformation; gamma is nonphysically reduced if cell volume is increasing.

I used solidBody motionMesh (constant cell volume) without this problems.

I tracked the error down to MULES. Find attached a simplified interDyMFoam, which uses (instead of MULES) a simple scalar transport equation for gamma (in gammEqn2.H). The result is plotted in the bottom plot of the attached animation.

MULES interface compression feature is highly desirable, thus I would like to use MULES in combination with moving mesh.

So, anybody any hint?

Thanks
Daniel



daniels is offline   Reply With Quote

Old   January 29, 2009, 05:37
Default Hi, and here the attachment
  #2
New Member
 
Daniel Schmode
Join Date: Mar 2009
Posts: 22
Rep Power: 17
daniels is on a distinguished road
Hi,

and here the attachments

movingGridFSproblem.tgz
movingGridFSproblem.avi
daniels is offline   Reply With Quote

Old   January 29, 2009, 16:16
Default Hi, Daniel, I downloaded yo
  #3
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Hi, Daniel,

I downloaded your solver and case, but, it requires MULES2.H (which you developed?). can you email me the code or post it here so that I can do some testing? thanks

Pei
peiying2003@yahoo.com
hsieh is offline   Reply With Quote

Old   January 29, 2009, 16:19
Default Hi, Daniel, I downloaded yo
  #4
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Hi, Daniel,

I downloaded your solver and case, but, it requires MULES2.H (which you developed?). can you email me the code or post it here so that I can do some testing? thanks

Pei
peiying2003@yahoo.com
hsieh is offline   Reply With Quote

Old   January 30, 2009, 05:30
Default Hi Pei, sorry for the incon
  #5
New Member
 
Daniel Schmode
Join Date: Mar 2009
Posts: 22
Rep Power: 17
daniels is on a distinguished road
Hi Pei,

sorry for the inconvenience. MULES2 was an unsuccessful attempt to solve the problem myself. Here is a version without MULES2

Daniel

movingGridFSproblemV2.tgz
daniels is offline   Reply With Quote

Old   January 30, 2009, 16:36
Default Hi, maybe I got a clue. I g
  #6
New Member
 
Daniel Schmode
Join Date: Mar 2009
Posts: 22
Rep Power: 17
daniels is on a distinguished road
Hi,

maybe I got a clue. I guess the trouble is in the volume change term in MUSESTemplates.C line 111. If nGammaSubCycles is larger than 0, it is evaluated multiple times (once in each subcycle) and adds to much gamma. Setting nGammaSubCycles to 0 cures the problem.

Daniel
daniels is offline   Reply With Quote

Old   January 30, 2009, 17:48
Default Hi again, I have a solution
  #7
New Member
 
Daniel Schmode
Join Date: Mar 2009
Posts: 22
Rep Power: 17
daniels is on a distinguished road
Hi again,

I have a solution, but one needs nGammaSubCycles within MULES.

In src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C:

111c111
< mesh.V0()*rho.oldTime()*psi0/(deltaT*mesh.V())
---
> pow((mesh.V0()/mesh.V()),(1./nGammaSubCycles)) *rho.oldTime()*psi0/deltaT

This works fine with nGammaSubCycles >0. What is the most elegant way to get nGammaSubCycles in MULES? Look it up from the dict or add to the MULES2::explicitSolve parameterlist?

Daniel
daniels is offline   Reply With Quote

Old   March 23, 2009, 12:47
Default
  #8
New Member
 
Lukas Fischer
Join Date: Mar 2009
Location: Innsbruck, Austria
Posts: 15
Rep Power: 17
lukasfischer is on a distinguished road
is there already a solution to this problem? how is it possible to get the nGammaSubCycles into MULES?

Last edited by lukasfischer; April 6, 2009 at 12:41.
lukasfischer is offline   Reply With Quote

Old   April 7, 2009, 10:31
Default
  #9
New Member
 
Lukas Fischer
Join Date: Mar 2009
Location: Innsbruck, Austria
Posts: 15
Rep Power: 17
lukasfischer is on a distinguished road
We (me and Mr. Scholochow) modified the MULES solver to include the nGammaSubCycles. It is passed as an argument to MULES::explicitSolve().
Code:
MULES::explicitSolve(gamma, phi, phiGamma, 1, 0,nGammaSubCycles);
nGammaSubCycles is defaulted to 1 to preserve the old interface.

To use the modified version extract the files to .../src/finiteVolume/fvMatrices/solvers/MULES/ and recompile the libfiniteVolume.so (wmake libso in .../src/finiteVolume/).

Solvers using MULES have to pass nGammaSubCycles. Change calls to MULES::explicitSolve in the gammaEqn.H in the solver as mentioned above.

regards
[update: corrected the code so the interface is really preserved]
Attached Files
File Type: gz MULES.tar.gz (4.0 KB, 70 views)

Last edited by lukasfischer; April 9, 2009 at 07:06.
lukasfischer 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
Oscillatory mesh motion setup mesh flux ERROR jaswi OpenFOAM Running, Solving & CFD 5 August 23, 2007 05:41
Negative volume in mesh motion skarp CFX 5 July 12, 2007 00:51
How to fix a volume cell? jpsegura FLUENT 0 May 31, 2007 19:42
negative cell volume in dynamic mesh WU zhonghua FLUENT 0 July 28, 2004 11:04
Cell-vertex and cell-centered finite volume method Praveen Main CFD Forum 4 September 9, 2003 00:58


All times are GMT -4. The time now is 07:31.