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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 12, 2012, 10:55
Default How to calculate the velocity field after mesh.update()?
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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
fisch is offline   Reply With Quote

Old   July 12, 2012, 11:27
Default
  #2
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
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.
tomislav_maric is offline   Reply With Quote

Old   July 13, 2012, 05:30
Default
  #3
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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
fisch is offline   Reply With Quote

Old   July 13, 2012, 06:41
Default
  #4
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by fisch View Post
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
tomislav_maric is offline   Reply With Quote

Old   July 13, 2012, 07:22
Default
  #5
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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
fisch is offline   Reply With Quote

Old   June 8, 2015, 04:41
Default
  #6
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
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 05:05. Reason: link for similar thread
Thangam 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
Editing chtMultiRegionFoam to not solve velocity field tH3f0rC3 OpenFOAM 18 January 24, 2020 17:39
Velocity field in staggered grid michujo Main CFD Forum 4 June 15, 2012 08:42
interpreting velocity field asharma OpenFOAM Post-Processing 2 October 9, 2010 02:19
How to get Pressure field from velocity field qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 08:38
Initial Condition in 3D flows. shekharc Main CFD Forum 9 June 8, 2005 05:17


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