View Issue Details

IDProjectCategoryView StatusLast Update
0000356OpenFOAMBugpublic2011-12-29 14:44
Reporterniklas.wikstrom Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformDell Intel X557OSRHELOS Version5.4
Summary0000356: interFoam results depend on geometrical translation of domain
Descriptiongit sha 4a2c44da8bc08afd6ccaf7a1b2106103748ec436

Possibly a well known issue with the p_rgh formulation but maby worth to mention anyway:

The interFoam solution is dependent on the spatial location of the domain.
Steps To Reproducerun interFoam tutorial "damBreak"

transformPoints -translate "(0 1000 0)"

rerun interFoam tutorial "damBreak" --> Crash/Different result


Additional InformationThank you all and Merry Christmas!
TagsinterFoam, multiphase

Activities

wyldckat

2011-12-14 11:25

updater   ~0000837

Uhm... a few questions:
  1. Did you translate before or after running "setFields"? If it was before setFields, then the dam domain is empty!
  2. 1000 over Y axis... I can't remember over which axis gravity works on this tutorial case... but if it is Y, perhaps it takes into account the altitude as well!? Disclaimer: I'm not 100% familiar with the intrinsics of interFoam :(

niklas.wikstrom

2011-12-14 11:49

reporter   ~0000840

Last edited: 2011-12-14 11:50

Hi,

1. ;-) after setFields
2. g (0 -9.81 0)

Altitude is not taken into account. But, since interFoam solves for p_rgh [p-rho*g*h], the gh term is present in e.g. the calculation of driving flux phi, and also in the buoyantPressure boundary condition. Hence my belief that the equations have some inbalance.

user258

2011-12-14 12:20

  ~0000841

I was not able to reproduce this error. I first ran blockMesh, setFields, interFoam, then I cleaned the old timedirs. After that I executed the mentioned transformPoints operation and ran interFoam again, without crash.

niklas.wikstrom

2011-12-14 12:56

reporter   ~0000842

My error. Does not crash with original settings, but gives different result. I realize that it is a sensitive system, and that 1 km is far away. Numerical errors propagating, but the difference in results I get is not very small.

E.g. patchIntegrate alpha1 rightWall: original = 0.001, translated 0.0005.

wyldckat

2011-12-14 14:09

updater   ~0000843

Last edited: 2011-12-14 14:11

Hold on: the solver tries to solve a physical problem, not a theoretical problem per say.
The boundaries and case set-up clearly state that it is running at 1km of altitude (where the gravity acceleration should actually be slightly lower); implicitly the pressures are different (density might be affected, but I think it's set to a fixed value) as you indicated with "p_rgh".

Therefore, it's only natural that the results aren't exactly the same!
edit: p_ref... some solvers use p_ref for this very same reason. Although can't remember if it'll work with interFoam.

Now, if you translate the volume in X or Z axis and the results are truly different, then that is indeed a source of concern ;)

henry

2011-12-29 14:44

manager   ~0000878

Due to the p_rgh formulation h is used directly in the discretisation and hence the location of the domain in the h direction will have a slight effect on the results. If h is so large that the values of p_rgh can no longer be represented accurately by double precision numbers the code will diverge.

If this particular behaviour is a problem an alternative would be to use (h - h0) rather than h in the formulation of p_rgh and for h0 to be provided as an input, say the bottom or middle of the domain of interest. I decided against this additional complexity when I implemented the p_rgh formulation as it seemed unlikely that the domain would be sufficiently far from the origin to cause problems. However, if it is considired a real issue I can add the option of specifying h0.

Issue History

Date Modified Username Field Change
2011-12-14 11:04 niklas.wikstrom New Issue
2011-12-14 11:08 niklas.wikstrom Tag Attached: interFoam
2011-12-14 11:08 niklas.wikstrom Tag Attached: multiphase
2011-12-14 11:25 wyldckat Note Added: 0000837
2011-12-14 11:49 niklas.wikstrom Note Added: 0000840
2011-12-14 11:49 niklas.wikstrom Note Edited: 0000840
2011-12-14 11:50 niklas.wikstrom Note Edited: 0000840
2011-12-14 12:20 user258 Note Added: 0000841
2011-12-14 12:56 niklas.wikstrom Note Added: 0000842
2011-12-14 14:09 wyldckat Note Added: 0000843
2011-12-14 14:11 wyldckat Note Edited: 0000843
2011-12-29 14:44 henry Note Added: 0000878
2011-12-29 14:44 henry Status new => closed
2011-12-29 14:44 henry Assigned To => henry
2011-12-29 14:44 henry Resolution open => fixed