# How to calculate the velocity field after mesh.update()?

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

 July 12, 2012, 09:55 How to calculate the velocity field after mesh.update()? #1 Member   fisch Join Date: Feb 2010 Posts: 97 Rep Power: 9 Hi, In my code to build a scalarTransportDyMFoam the mesh is changed with mesh.update() corretely. Now i need a adjusted velocity field to calcuate phi out of it and to make it relative for my calculation of the PDE (scalarTransport Eqn.). Do you know how to adjust the U field? Thanks for any advice. Rupert

 July 12, 2012, 10:27 #2 Senior Member   Tomislav Maric Join Date: Mar 2009 Location: Darmstadt, Germany Posts: 281 Blog Entries: 5 Rep Power: 13 This is from interDyMFoam.C: Code: ``` { // Calculate the relative velocity used to map the relative flux phi volVectorField Urel("Urel", U); if (mesh.moving()) { Urel -= fvc::reconstruct(fvc::meshPhi(U)); } // Do any mesh changes mesh.update(); }``` Does this help? You also have a correctPhi.H to include later. Check out the source.

 July 13, 2012, 04:30 #3 Member   fisch Join Date: Feb 2010 Posts: 97 Rep Power: 9 Hi Tomislav, thanks for the post. In your given code you first calculate the U_relative and then you do the meshMotion, right? What i want is to move the mesh and then i want to get the corresponding U_rel and U_abs. Is this possible? Thanks Rupert

July 13, 2012, 05:41
#4
Senior Member

Tomislav Maric
Join Date: Mar 2009
Posts: 281
Blog Entries: 5
Rep Power: 13
Quote:
 Originally Posted by fisch Hi Tomislav, thanks for the post. In your given code you first calculate the U_relative and then you do the meshMotion, right? What i want is to move the mesh and then i want to get the corresponding U_rel and U_abs. Is this possible? Thanks Rupert
Hi Rupert,

why do you need to calculate the relative flux in this order, when it is actually prescribed with a given velocity field and the existing, non-moved mesh?

Tomislav

 July 13, 2012, 06:22 #5 Member   fisch Join Date: Feb 2010 Posts: 97 Rep Power: 9 Ok, the whole story: I want to build a scalarTransportFoam solver with moving meshes. I think it works the following way: After mesh.update() i have to figure out my current U_rel or U_abs. And calculate the corresponding phi field. Then i have to make the phi relative as an explicit input of the equation. Finally i want to store my U_abs field in my output files. Right now the velocity field is not updated due to the mesh motion. It stays constant on the initial field. Do you get my concern? Thanks

 June 8, 2015, 03:41 #6 Member   Thangam Natarajan Join Date: Dec 2010 Location: Perth Posts: 63 Rep Power: 9 Hi, I know this is a old thread. Just wondering if you managed to solve the issue. http://www.cfd-online.com/Forums/ope...ic-meshes.html Thanks Thangam. Last edited by Thangam; June 8, 2015 at 04:05. Reason: link for similar thread

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post michujo Main CFD Forum 4 June 15, 2012 07:42 tH3f0rC3 OpenFOAM 16 April 20, 2011 10:53 asharma OpenFOAM Post-Processing 2 October 9, 2010 01:19 qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 07:38 shekharc Main CFD Forum 9 June 8, 2005 04:17

All times are GMT -4. The time now is 08:56.