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

Problem of restarting moving meshes with icoDyMFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2007, 05:21
Default Hi, I have detected a problem
  #1
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Hi,
I have detected a problem with restarting the calculation of moving meshes.
The problem is, that if you calculate moving meshes with icoDyMFoam, the solution of the phi field is stored as relative phi (phi - meshPhi).
If you restart the same calculation, phi is read and handled as absolute phi.
My first intention to handle this problem was to make the fluxes absolute before storing them with runTime.write and make them relative again directly afterwards.
This is at least not nice, as the fluxes are stored as absolute ones. Moreover if you restart the calculation and use a dynamic time step you get a problem as the Co-number is determined wrongly.
As there is stored meshPhi when handling moving meshes, it may be best to change the fvMesh constructor in a way that it reads meshPhi if present and sets the moving_ attribute of polyMesh to true.
That would leave icoDyMFoam uneffected and solve the problem I think.
Any acceptance or denial?

Rolando
rolando is offline   Reply With Quote

Old   March 22, 2007, 05:31
Default Yes your proposal looks reason
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Yes your proposal looks reasonable, I will try it in 1.4 and if all is well the change will go out in the release.

Henry
henry is offline   Reply With Quote

Old   March 22, 2007, 05:43
Default Meanwhile I will try it myself
  #3
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Meanwhile I will try it myself, so that I can continue my work with 1.3.
I think I just have to change moving_ from private to protected in polyMesh and change the fvMesh constructor.
Can you estimate when 1.4 will be released?

Rolando
rolando is offline   Reply With Quote

Old   March 22, 2007, 05:56
Default Yes that should be enough. 1.
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Yes that should be enough. 1.4 is undergoing beta testing and will be released soon.

Henry
henry is offline   Reply With Quote

Old   March 22, 2007, 06:00
Default I´m looking forward to 1.4. I
  #5
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
I´m looking forward to 1.4.
I´ll tell you if the changes in polyMesh and fvMesh fix the problem.

Rolando
rolando is offline   Reply With Quote

Old   March 22, 2007, 07:58
Default Hello Hrvoje, as far as I und
  #6
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Hello Hrvoje,
as far as I understand the library, the above way indeed doesn´t restore all informations (like the points before motion, swept volumes, ...).
But the only information that is accessable, when loading the data from a time directory is the meshPhi field. And the only informations that I can recover of it are the mesh fluxes (of course) and the fact that the mesh is moving (moving_ = true;)
But that are the only information that I need for icoDyMFoam, which uses polyMesh.moving() and fvc::meshPhi(U). And fvc::meshPhi just accesses phiPtr_, which is a member of fvMesh.
Is something wrong about that?

Rolando
rolando is offline   Reply With Quote

Old   March 22, 2007, 10:16
Default I see the problem. It would b
  #7
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
I see the problem.
It would be nice if there was a solution to this problem. Meanwhile I use the above fix. It seems to work. I have tested a first shot.
To the above things I had also to assure that V0 was stored. It is obviously used by the time schemes.

There I encountered an inconsistency in fvMesh.
In fvMesh::V00() there is the line of code:

V0Ptr_->writeOpt() = IOobject::AUTO_WRITE;

But in fvMesh::movePoints(..) where V0Ptr_ is created, the IOobject of V0Ptr_ has the "false flag" for registering this object. So it can´t be stored and the above line of code has no effect. I think the false flag has to be removed.

Rolando
rolando is offline   Reply With Quote

Old   March 23, 2007, 05:51
Default Rolando, I have implemented
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Rolando,

I have implemented your suggested change into 1.4 and adjusted the handling of V0 to be consistent (slightly differently to your approach) and it runs and restarts fine now. I have also taken this a bit further and made some improvements to the handling of absolute and relative flux conversions in the libraries and icoDynFoam to handle the case of no mesh motion more elegantly and to make the code simpler.

Henry
henry is offline   Reply With Quote

Old   March 23, 2007, 06:18
Default Thanks Henry, that sounds ver
  #9
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Thanks Henry,
that sounds very good. I´m really looking forward to 1.4.

One word about what I did:
In the fvMesh constructor I made a request for the meshPhi file before creating the meshPhi object, to ensure it isn´t created for non-moving cases.

Rolando
rolando 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
Problem with icoDyMFoam olivier OpenFOAM Running, Solving & CFD 13 December 19, 2008 09:03
IcoDyMFoam and tetrahedral meshes ulrich_lange OpenFOAM Running, Solving & CFD 11 April 16, 2007 16:44
Problem with icoDyMFoam philippose OpenFOAM Running, Solving & CFD 19 March 7, 2007 12:06
Restarting problem CFD-User Main CFD Forum 0 November 10, 2006 07:42
Restarting for problems with moving meshes Maya Siemens 2 October 4, 2002 03:51


All times are GMT -4. The time now is 10:15.